Forums
This topic is locked
search problem
Posted 03 Feb 2003 01:17:29
1
has voted
03 Feb 2003 01:17:29 Dan Schultz posted:
Hi, I'm having a problem with this search feature. For instance: go to lewismotors/inventory/searchVehicle.php and do a search on "honda". Instead of just bringing up Honda vehicles, it brings up all the vehicles in the database.
Here's my query statement:
SELECT *
FROM vehicles
WHERE model LIKE 'varModel%' OR vehicles.make LIKE 'varMake%' AND vehicles.`year` = 'varYear'
ORDER BY ID ASC
some help would greatly be appreciated.
Dan
www.intriguemedia.net
Replies
Replied 03 Feb 2003 01:19:28
03 Feb 2003 01:19:28 Dan Schultz replied:
sorry, the URL is www.intriguemedia.net/lewismotors/inventory/searchVehicle.php
Replied 03 Feb 2003 01:50:09
03 Feb 2003 01:50:09 Owen Eastwick replied:
At a guess, the Vehicle etc. selected/searched for isn't being picked up and stored in the variables varMake varModel etc.
Check to see if this is the case by changing the default values of the variables.
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only):
www.tdsf.co.uk/tdsfdemo/Shop.htm
Multiple Parameter UD4 / Access 2000 Search Tutorial:
www.tdsf.co.uk/tdsfdemo/
Check to see if this is the case by changing the default values of the variables.
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only):
www.tdsf.co.uk/tdsfdemo/Shop.htm
Multiple Parameter UD4 / Access 2000 Search Tutorial:
www.tdsf.co.uk/tdsfdemo/
Replied 03 Feb 2003 18:35:14
03 Feb 2003 18:35:14 Brent Colflesh replied:
Dear Dan,
Owen is probably correct - also, check my response in the PHP forum to make your query more concise.
Regards,
Brent
PS - don't post the same question to different forums.
Owen is probably correct - also, check my response in the PHP forum to make your query more concise.
Regards,
Brent
PS - don't post the same question to different forums.