|
|
Mysql Result Problem - mysql sending back no results for select statement | ||
Discussion by jaruba with 2 Replies.
Last Update: June 12, 2009, 2:04 am | |||
![]() |
|
|
this line:
seems to not get any results from mysql, it works fine until my php page generates the and inf_cat = 'movies' and inf_scat = 'Other'.
i indeed have a line that has xmen in the inf_name col, movies in inf_cat and Other in inf_scat. is there an error in my select query? any help would be appreciated.
CODE
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 DESCseems to not get any results from mysql, it works fine until my php page generates the and inf_cat = 'movies' and inf_scat = 'Other'.
i indeed have a line that has xmen in the inf_name col, movies in inf_cat and Other in inf_scat. is there an error in my select query? any help would be appreciated.
Use that query inside the phpmyadmin SQL tab to see what results are generated.
Hi!
Apparently, everything you've got in the database seems to be in lower case, except for the "O" in "inf_scat = 'Other'". Can you verify that your capitalization is correct?
Run the query:
select * from fusion_tor_info where inf_cat = 'movies'
and the query
select * from fusion_tor_info where inf_scat = 'Other'
to determine if you get any results.
If both queries work fine and, as you've mentioned, the query also works fine without adding the two additional conditions in the where clause then you probably just don't have "xmen" within the Movies - Other category. Check your data and reply back to the thread if you're still have an issue with it.
Regards,
Nitin Reddy
Apparently, everything you've got in the database seems to be in lower case, except for the "O" in "inf_scat = 'Other'". Can you verify that your capitalization is correct?
Run the query:
select * from fusion_tor_info where inf_cat = 'movies'
and the query
select * from fusion_tor_info where inf_scat = 'Other'
to determine if you get any results.
If both queries work fine and, as you've mentioned, the query also works fine without adding the two additional conditions in the where clause then you probably just don't have "xmen" within the Movies - Other category. Check your data and reply back to the thread if you're still have an issue with it.
Regards,
Nitin Reddy
Similar Topics:
Submitting A Form In Flex follow U...
Logo Design
Hey guys I've decided myself to show you how a proffesional logo design should be made.For our work we need two softwares, imagination and a bit of knowledge in designing.
Wee need Adobe Illustrator and Photoshop to complete our tutorial. I know not many people has Illustrator so I've ...more
Making A Simple Platformer In Game ...
Joomla - Upload Template Built Localhost To The Server (3)
|
(2) Need To Outsource Online Game Development, Cartoon Style Educational Games Tips? Can you do it?
|
Loading...
HOME 





Connect to MySQL Database - Use Select, Insert, Update - C# C Sharp Visual Studio 2010
[MySQL Tutorial]: Basic Queries (Select, Update, Delete, Insert)
How to Create an HTML Select Box Populated With Data From a MySQL Database Using PHP

