Re: [PHP-DB] LEFT joins

2005-01-20 Thread Jochem Maas
Basile Francesco wrote: In general, you should not worry about faster query sintax, since mysql should (but i'm not sure) have an "optimizer" inside wich translate your sintax query in a "better" efficient one. Anyway, the "where" statement is perfectly equal to the "join" operator, it is called

Re: [PHP-DB] LEFT joins

2005-01-20 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: I'm not but his original query used JIONs and a LEFT JOIN is (IMHO) the easiest to understand. I didn't have the presence of mind to rewrite the query using a simple WHERE clause - hope your tip helps him. btw: can anyone say if the LEFT JOIN or the alter

Re: [PHP-DB] LEFT joins

2005-01-20 Thread Martin Norland
Jochem Maas wrote: I'm not but his original query used JIONs and a LEFT JOIN is (IMHO) the easiest to understand. I didn't have the presence of mind to rewrite the query using a simple WHERE clause - hope your tip helps him. btw: can anyone say if the LEFT JOIN or the alternative WHERE statement

Re: [PHP-DB] LEFT joins

2005-01-20 Thread Basile Francesco
In general, you should not worry about faster query sintax, since mysql should (but i'm not sure) have an "optimizer" inside wich translate your sintax query in a "better" efficient one. Anyway, the "where" statement is perfectly equal to the "join" operator, it is called, in general, "theta-joi

Re: [PHP-DB] LEFT joins

2005-01-20 Thread Jochem Maas
OR SELECT b.fldName, b.fldEmail, b.fldCountryCode, d.fldCode as FCode, b.fldMobile, a.fldTime as Time, c.fldUsername as Username FROM tblSubscribersChoices a LEFT JOIN tblUser c ON c.fldClientID = a.fldChoice LEFT JOIN tblSubscribers b ON b.fld

Re: [PHP-DB] LEFT joins

2005-01-20 Thread franciccio
Jochem Maas ha scritto: Han wrote: Hmm, still no luck. Thanks for the help. I think I'll have to break the you mean that it still times out? crashes mysql? maybe the table (tc_countries) is corrupt? try doing a repair. select up into 2 selects and throw the results of the first into arrays. Didn'

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Han
;[EMAIL PROTECTED]> To: "Han" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, January 12, 2005 4:06 PM Subject: Re: [PHP-DB] LEFT joins Han wrote: Oh yes, sorry, not used to the "reply-all". most of us get hammered by that one once in a while! read on the the interesting bit... I

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Jochem Maas
Han wrote: Hmm, still no luck. Thanks for the help. I think I'll have to break the you mean that it still times out? crashes mysql? maybe the table (tc_countries) is corrupt? try doing a repair. select up into 2 selects and throw the results of the first into arrays. Didn't want to do it like that

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Jochem Maas
Han wrote: Oh yes, sorry, not used to the "reply-all". most of us get hammered by that one once in a while! read on the the interesting bit... I've pasted it directly into the MYSQL console as just sql and this is where I discovered my problem. My code is : -- SELECT b.fldName, b.fldEmail, b.fldC

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Jochem Maas
BTW: Hans please use 'reply to all' so that the rest of the list can see your replies (+ it makes me feel less like you personal help-desk ;-). ...on to the reply proper: Han wrote: Hi, thanx for replying. It still times out when I use either of those alternatives. can you tell what exactly the s

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Han
- From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Han" <[EMAIL PROTECTED]>; Sent: Wednesday, January 12, 2005 1:51 PM Subject: Re: [PHP-DB] LEFT joins BTW: Hans please use 'reply to all' so that the rest of the list can see your replies (+ it makes me feel less li

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Jochem Maas
Han wrote: Hi, I'm having a problem with some joins. My code is : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID

[PHP-DB] LEFT joins

2005-01-12 Thread Han
Hi, I'm having a problem with some joins. My code is : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID ORDER BY

RE: [PHP-DB] left joins and mysql

2002-01-31 Thread Rick Emery
ht_id && p.player_status='captain' ORDER by t.flight_id -Original Message- From: tom hilton [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 8:27 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] left joins and mysql Hi, I am trying to do a left join on a "master" ta

[PHP-DB] left joins and mysql

2002-01-31 Thread tom hilton
Hi, I am trying to do a left join on a "master" table, but I don't want to pull all the records from this table. Can anyone tell me the syntax for using a WHERE or equivalent on the master table before left joining the slave table? Is this possible, or do I have to pull all the records from the