PDA

View Full Version : Damn You Php


quit that
03-21-2004, 12:31 AM
So... I'm writin' some code. And... It should work. But it doesn't. So... Explain to me why it doesn't and how I should fix it.

$get_members = "SELECT * FROM memberlist WHERE group='$groupname' ORDER BY number2";
$get_members_result = mysql_query($get_members)
or die ("Couldn't find information");


I end up just getting the die statement.

Kaity
03-21-2004, 06:10 AM
:unsure:

Crestfallen
03-21-2004, 08:56 AM
Did you try it without the ORDER BY statement.. cause the rest of the query looks ok

other than that, it might be the connection to the database itself, or $groupname that isn't initialized

quit that
03-21-2004, 02:56 PM
I tried it without the ORDER BY, didn't help. I checked the connection, it was fine. I checked $groupname, it was initialized.

Death in a Bottle
03-21-2004, 08:14 PM
I'm going to have to blame it on... The Brits.

quit that
03-21-2004, 09:03 PM
I concur.

quit that
04-04-2004, 05:33 PM
So it turns out you need to put variables in strings in brackets.