Page 1 of 1

SQL Error

Posted: Wed Nov 26, 2003 12:25 pm
by Rob
I decided to stop making my own user system and I got one from one of my friends, but theres an error and the code is either sloppy, or I just cant understand it...so is this enough for you to help me?

Code: Select all

$query = "select * from ".$group; if(!$all) $query .= " where approve='0'"; $query .= " order by id desc";

Posted: Wed Nov 26, 2003 12:29 pm
by Weirdan
No, it isn't. Post error messages you're getting along with the code.

Posted: Wed Nov 26, 2003 12:55 pm
by Johnm
Are you shure that
approve='0'
is a string and not an int?

John M

Posted: Wed Nov 26, 2003 2:04 pm
by Rob
Im using the Revulsion User system, my friend gave it to me..im not sure if anyone knows what it is but you can get it at
http://www.discardedsoftware.com/revulsion-system.zip.

The codes so confusing im not even sure where the errors at. I know its in content.php though. (Is this for unix only?)

Posted: Thu Nov 27, 2003 6:36 am
by Weirdan
Johnm wrote:Are you shure that
approve='0'
is a string and not an int?
It doesn't matter, at least if he is using MySQL.

Posted: Sat Nov 29, 2003 5:28 pm
by JAM
Rob wrote:The codes so confusing im not even sure where the errors at. I know its in content.php though. (Is this for unix only?)
How do you know that the errors are from content.php? I'm guessing that you are seeing some sort of error message, and as weirdan said, that is what we could use right now.

If that error also states a line-number, you should post that and the 3 above and below with it...