Jump to content

Weird SQL return


Minase

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

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

Archived

This topic is now archived and is closed to further replies.

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