Forum Moderators: open

Message Too Old, No Replies

mysql result problem

not getting any results on select query

         

jaruba

2:17 pm on May 12, 2009 (gmt 0)

10+ Year Member



i seem to get 0 results with no errors on the below statement to mysql:

select * from fusion_tor_info where (inf_name like '%xmen%' or inf_desc like '%xmen%' or inf_loc like '%xmen%' ) and inf_cat = 'movies' and inf_scat = 'Other' order by inf_seeds DESC

i do have a line that includes 'xmen' in inf_name, an exact match to 'movies' in inf_cat and an exact match to 'Other' in inf_scat.. and the command works as it should until my php page generates:

and inf_cat = 'movies' and inf_scat = 'Other'

in the select line. am i doing this incorrectly? :¦
any help would be appreciated.

phranque

7:03 am on May 14, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], jaruba!

first you should determine if it's a mysql problem or a php problem.
have you tried that query in the mysql command line tool?

jaruba

11:39 am on May 14, 2009 (gmt 0)

10+ Year Member



thank you for the reply phranque, i've tried and tried again imagining that it was always a mysql query problem, seems the query works as it should in the mysql command line tool.

i'll take a look again in the php file.

phranque

8:45 am on May 24, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



is your php properly escaping the quotes in the sql statement?