So is there any other alternative.
Thanks,
Abhishek jain
On 3/10/07, Michael Dykman [EMAIL PROTECTED] wrote:
LIKE and NOT LIKE can be a dangerous path.. it is very easy to put
yourself in a situation where your logic design requires full table
scans for every query..
- michael dykman
On
I have the following table:
messages:
if:
from_user_id:
to_user_id:
body:
created_at:
updated_at:
I have to return all the rows that have a distinct from_user_id based
on a to_user_id. Not only that but I want to return the rows with the
newest created_at.
I thought this would work:
I think I got it:
SELECT * FROM (SELECT * FROM messages ORDER BY created_at DESC) as
messages WHERE to_user_id = 1 GROUP BY from_user_id;
Is this the best way about it... or are their better ways you suggest?
On 3/11/07, John Kopanas [EMAIL PROTECTED] wrote:
I have the following table:
Ok, did not work... hmmm... any other suggestions?
On 3/11/07, John Kopanas [EMAIL PROTECTED] wrote:
I think I got it:
SELECT * FROM (SELECT * FROM messages ORDER BY created_at DESC) as
messages WHERE to_user_id = 1 GROUP BY from_user_id;
Is this the best way about it... or are their better
Hello Imre,
Imre Palik wrote:
Hi,
When I try to run this function, I receive ERROR 1146 (42S02): Table
'gi2.meta' doesn't exist
CREATE FUNCTION get_version()
RETURNS INT UNSIGNED
BEGIN
DECLARE exist_ TINYINT;
SELECT COUNT(*) INTO exist_ FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA
Imre,
You may have found a stored function bug--the server tries to evaluate
the SELECT statement within the IF block when IF condition is false.
PB
-
Shawn Green wrote:
Hello Imre,
Imre Palik wrote:
Hi,
When I try to run this function, I receive ERROR 1146 (42S02): Table
Mysql has any Dead lock detection ??
I tried to probe it but don ´t detect it.
Thanks,
RAUL DUQUE
Bogotá, Colombia
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]