Jump to content

Pulling mySQL Info


AlbumFiend

Recommended Posts

I've got a variable that's like:

$extra_alb_qry .= " ORDER BY `id` DESC";

 

and a variable that's like:

$extra_alb_qry .= " AND `cat_id` = " . $_GET['genre'];

 

Both of these work, but I want to change the 2nd one so it does the same thing but also has ORDER BY `id` DESC in it also, each time I edit it though it ends up pulling no data.

Link to comment
https://forums.phpfreaks.com/topic/171207-pulling-mysql-info/
Share on other sites

Please note that mikesta707 and I BOTH used the same order! that should work!

 

if you still have problems then please let us know what the problem is; "This doesn't work" is truly not helpful, I could reply "it does for me" or "theirs a problem then" which helps just as much,

 

I'll have to assume that $_GET['genre'] isn't set.. echo out the query and check.. also turn on error reporting and use mysql_error();

 

for more details see Daniel0 post that points to the manual,

Link to comment
https://forums.phpfreaks.com/topic/171207-pulling-mysql-info/#findComment-902881
Share on other sites

Please note that mikesta707 and I BOTH used the same order! that should work!

 

if you still have problems then please let us know what the problem is; "This doesn't work" is truly not helpful, I could reply "it does for me" or "theirs a problem then" which helps just as much,

 

Yeah he put it together the other way around though. That's why it doesn't work.

Link to comment
https://forums.phpfreaks.com/topic/171207-pulling-mysql-info/#findComment-902883
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.