|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am having a problem with this script,
Where a user can perform a search based on the values selected. It is uploaded to my server now and it works fine. The form is filled in and the search works perfectly. However, as soon as I leave the page and visit another page in my site, then return to the page it generates this error: You have an error in your SQL syntax near 'AND weightCap BETWEEN ' at line 1 If I just use my back button to return to the page, again the script works fine. I can refresh the page and it still works. Why does it not work once I leave the page and return? Here is the code: PHP Code:
Last edited by seetherman : February 27th, 2003 at 07:38 PM. |
|
#2
|
|||
|
|||
|
Paste the entire url address here when you get the error message... that may tell us why you have a problem.
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#3
|
|||
|
|||
|
URL
This is the url address, now it generates this error everytime. You have an error in your SQL syntax near 'AND weightCap BETWEEN ' at line 1 I can't see what is wrong with the code? Am I using the BETWEEN clause correctly? This exact script was previously working, I changed nothing, and now it does not work. Any ideas? |
|
#4
|
|||
|
|||
|
instead of
PHP Code:
try this instead PHP Code:
That may help |
|
#5
|
|||
|
|||
|
I figured out the problem...
I needed to declare the variables first, with some dummy values, like: $price = 1 AND 2 $weightCap = 1 AND 2 Before I had updated the page with another script that had these values stored, so the script ran. Then when I exited the page and returned again the variables were empty and the script hanged. Well, now it works. Thanks- |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Weird problem? PHP script works 'sometimes' |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|