Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: SQL Fetch not showing results.
10-21-2013, 05:49 PM #1
- Join Date
- Oct 2013
- Thanked 0 Times in 0 Posts
SQL Fetch not showing results.
I'm fairly new to PHP coding, and also all other forms of coding too...
I run a website that someone else does the "big boy jobs" on, while I have to somehow figure out the little ones.
I am trying to fetch new results from the SQL.
This one worked in the old version- $q_videos = "SELECT * FROM `videos`,`users` WHERE (`videos`.uid = `users`.uid AND `catagory` LIKE '$cat')" or die( "Unable to select database");
But I am trying to add an "active = 1" as we have active, and inactive videos now.
The active part is kept in the Videos section in the SQL also, so I assumed this would work;
$q_videos = "SELECT * FROM `videos`,`users` WHERE (`videos`.uid = `users`.uid AND `catagory` LIKE '$cat' AND `active` = '1')" or die( "Unable to select database");
I probably did something so tiny wrong, but I'm a newb who needs sympathy.
Any help would be super lovely!
10-21-2013, 06:07 PM #2
- Join Date
- Dec 2005
- Thanked 78 Times in 78 Posts
`active` = 1
`active` = '1'
If there are such data (Type int, value 1) in 'active' column of table 'videos'
Otherviuse you simply don't have '1' data in 'active' column of Type varchar or similar
10-21-2013, 08:42 PM #3
You also don't say what error you get, if any.
And did you try the query from a query tool, *NOT* from your own PHP code?Be yourself. No one else is as qualified.