Jump to content

Recommended Posts

I like the way you are thinking but you are very unclear (it could be just me but .. ) on what you are asking.

 

Can you be more specific? :-\

 

If you are NOT getting any errors, it could be the way you stated your query.

 

The only thing that catches my eye is that there should be full stop between your database name and the table name.

 

e.g.

mysql_query(SELECT * FROM database.table ORDER BY `Level` DESC LIMIT 0 , 50);

 

"please don`t rely on this code to be correct its just for e.g. purposes only"

Link to comment
https://forums.phpfreaks.com/topic/118069-weird-sql-return/#findComment-607487
Share on other sites

DBPREFIX is just a prefix like "prefix_users" when im using order it work,but 50%

it select what it need (no error) but it doesnt order by what i want (Level in my case)

if i use ORDER BY Level DESC it return just how the records in prefix_users are but from the last to the first,if i use asc from first to last,how they are in table (its like ignoring my order syntax )

Link to comment
https://forums.phpfreaks.com/topic/118069-weird-sql-return/#findComment-607502
Share on other sites

that is the whole query i did try to debug and weird no problem,but even if i run the code into phpmyadmin it return same result :o

$ranking = mysql_query("SELECT * FROM `" . DBPREFIX . "users` ORDER BY Capture DESC Limit 0,50") or die(mysql_error());

 

mysql MySQL 5.0.51b

Link to comment
https://forums.phpfreaks.com/topic/118069-weird-sql-return/#findComment-607517
Share on other sites

When I ran the query, it worked as I expected.(No funny stuff)

 

I`m no expert but if the version your using is a BETA version it could be that.

(Again could be but Ive had my problems with BETA)

 

Try this link:

http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html

 

What is it you are trying to do? if I may ask.

Link to comment
https://forums.phpfreaks.com/topic/118069-weird-sql-return/#findComment-607536
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.