Re: Google like search string to be implemented

2007-03-11 Thread abhishek jain
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

Finding a Solution To A Distinct Problem of Mine

2007-03-11 Thread John Kopanas
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:

Re: Finding a Solution To A Distinct Problem of Mine

2007-03-11 Thread John Kopanas
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:

Re: Finding a Solution To A Distinct Problem of Mine

2007-03-11 Thread John Kopanas
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

Re: Table doesn't exist from stored function

2007-03-11 Thread Shawn Green
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

Re: Table doesn't exist from stored function

2007-03-11 Thread Peter Brawley
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

Dead lock detection?

2007-03-11 Thread Raúl Andrés Duque
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]