SQL Error

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Rob
Forum Commoner
Posts: 33
Joined: Fri Oct 03, 2003 3:18 pm

SQL Error

Post 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";
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

No, it isn't. Post error messages you're getting along with the code.
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Post by Johnm »

Are you shure that
approve='0'
is a string and not an int?

John M
User avatar
Rob
Forum Commoner
Posts: 33
Joined: Fri Oct 03, 2003 3:18 pm

Post 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?)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post 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...
Post Reply