I think that you can not concat and ORDER BY? (or ORDER by a function).
Hope this help
Simon
-----Original Message-----
From: Carlos Savoretti [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 15:53
To: [EMAIL PROTECTED]
Subject: Can I do this ?
I'm using C API to access MySQL from another database in order to re-use
a lot of existing software. Due the way the old database works I need
a query be done like this:
SELECT * FROM some_table WHERE field1 = 1 AND field2 > 0
ORDER BY CONCAT(field1,field2) LIMIT 1
This is for not to create a new field formed by field1+field2 because
every time a row be updated, I would update this "key" field... (not
sure about consistency).
The point is that I've an error: syntax error near 'CONCAT(field1,...'
What thing is wrong ?
Regards
[EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php