Not working in MYSQL5.1
Since MYSQL was upgraded to V5 on my server, my code now fails with invalid syntax. It worked fine before. Can anyone tell me what I need to change?
Code is:
$getrange = $_GET['rangesel'];
$getwood = $_GET['woodsel'];
$getroom = $_GET['roomsel'];
if ($getrange == 'All') {
$getrange = '%';
}
if ($getwood == 'All') {
$getwood = '%';
}
if ($getroom == 'All') {
$getroom = '%';
}
SELECT stocknum FROM stock where range like '$getrange' and wood like '$getwood' and room like '$getroom'"
Basically, where $_GET formfields == "All" I want to select rows with any value in that field
Subject
Written By
Posted
Not working in MYSQL5.1
August 18, 2010 05:43AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.