Jump to content

Puzzling MySQL Error


korrupt03

Recommended Posts

We\'ve got a problem on our hands.. :roll:

 

Well okay, I run a flash portal on my site, http://www.stickslaughter.com/ss/portal/ and the current arrangement for the Staff animations isn\'t working..

 

Okay, well, I am attempting to create a page where it displays a staff members 3 latest animations, (http://www.stickslaughter.com/ss/portal/stafftest.php), then display a link to show all of their animations.. but.. mySQL gives off a weird errors.. here\'s what I\'m trying..

 


$sql = "SELECT * FROM $table WHERE user_id = \'1\' DESC LIMIT 3";

 

I know the table, select, from, and where are right, plus user_id is the correct table.. but it gives off a weird error. I need to include the DESC, which is suppose to display it in Descending order, or backwards, because if I just use:

 


$sql = "SELECT * FROM $table WHERE user_id = \'1\' LIMIT 3";

 

... it displays the list of 3 animations, but it\'s in oldest to newest, which doesn\'t work...

 

user_id =\'1\' is correct, because the user_id 1 is a staff animators number...

 

But if I take off the DESC, it works...

 

So basically, is their anyway to put it in DESC order, but use a WHERE..

 

Help! :shock:

 

8) KoRRupt

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.