COUNT() Efficiency

2006-04-08 Thread Martin Gallagher
Hi, If I did a query like: SELECT COUNT(id) AS count1, COUNT(id) AS count2 FROM table WHERE id<100 Would MySQL run the COUNT() calculation once or twice? Cheers -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROT

Bulk Duplicate Inserts

2006-04-07 Thread Martin Gallagher
Hi, In a messaging system I'm working on, I will allow user's to send the same identical message to numerous other people. Kind of like in email you can separate recipients with ";" or use CC. It would be nice to be able to perform a query like so: INSERT INTO messages, social_networking (author

RE: Social Network, linking members

2006-04-07 Thread Martin Gallagher
! That's exactly the problem. I think I might just have to grin and bear what I already have :-( -Original Message- From: 2wsxdr5 [mailto:[EMAIL PROTECTED] Sent: 07 April 2006 15:11 To: Martin Gallagher; mysql@lists.mysql.com Subject: Re: Social Network, linking members Martin Gallagher w

RE: Social Network, linking members

2006-04-07 Thread Martin Gallagher
be flagged as 1: MYID, REQUEST_USER_ID, 'family', 1 Using 2 tables would help the indexing problem, but it's definetly NOT how I want to achieve this. -Original Message- From: Jad madi [mailto:[EMAIL PROTECTED] Sent: 07 April 2006 15:00 To: Martin Gallagher Cc: mysql@lists

Social Network, linking members

2006-04-07 Thread Martin Gallagher
Hi, I'm trying to find the most efficient way of "linking" members to one another in a social networking application. Currently I link them using 2 separate fields for the members: id1, id2. So, to find people in your network you would do: WHERE id1=%ID OR id2=%ID This uses indexes inefficientl

RE: Include repeats in query

2005-04-18 Thread Martin Gallagher
Shawn, that's perfect, EXACTLY what I was looking for! Gotta take more notice of the reference manual from now on tho. - Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 14:22 To: Martin Gallagher Cc: mysql@lists.mysql.com Subjec

Include repeats in query

2005-04-16 Thread Martin Gallagher
Hi, I have the following query: SELECT person FROM people WHERE ORDER BY RAND() * (1 / score) LIMIT 1 This returns a person randomly, but the chance of the person being selected is increased with a higher `score`. What I want to do is make a single query that will return 10 results

RE: MySQL 4.1.8 and storing east characters

2005-01-18 Thread Martin Gallagher
erted into the database. Does anyone have any experience in dealing with inserting Japanese symbols in MySQL 4.1 via PHP5? Thanks again, - Martin -Original Message- From: Daniel BODEA [mailto:[EMAIL PROTECTED] Sent: 17 January 2005 23:20 To: Martin Gallagher Subject: Re: MySQL 4.1.

RE: MySQL 4.1.8 and storing east characters

2005-01-17 Thread Martin Gallagher
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 15 January 2005 22:09 To: Martin Gallagher Cc: mysql@lists.mysql.com Subject: RE: MySQL 4.1.8 and storing east characters So its just the Japanese titles which aren't working? The Greek and Cyrillic looked ok to me. If that&#x

MySQL 4.1.8 and storing east characters

2005-01-15 Thread Martin Gallagher
Hi, Iâve recently upgraded to MySQL 4.1.8 for the UTF-8 support. Iâve updated my previous data which was Western European languages, now Iâd like to get to grips on more exotic dialects such as Korean, Japanese and deep East languages such as Greek and Romanian. The problem is I keep