ive two tables bus_details and route_details
bus_details contains busid, busname,bustype
route_details contains routeid, busid, routename, route
(here route is a medium text area, where the main locations are listed delimited by using commas)
wat ive to do is just a search, using 2 locations in the route (from & to ), bustype. the result should contain the busid by searching the bus_details for bustype and route_details for the two locations searched.
i used this query
$qry = "select bus_details.busid from bus_details, route_details where bus_details.busid = route_details.busid and bus_details.bustype like '%$bus_type%' and route_details.route like '%$from%' and route_details.route like '%to%'";
in some cases it is working correctly, but evenif in the sql query runner in phpmyadmin gives zero rows as result set, the it is listing 1 row as result. which is some how took by using the bustype(not even checking the from, to etc from route )
can anyone plz help me...?
im a beginner in php...
any help will b appreciated
thanks in advance...
Rose