Re: [PHP] MySQL Join

2002-12-31 Thread Jason Wong
On Wednesday 01 January 2003 00:21, John Hinton wrote: > Stuck on this join temp > > From one table I need to > > mysql_query("CREATE TEMPORARY TABLE temp TYPE=HEAP SELECT DISTINCT > field1, field2 FROM $table"); > > both field1 and field2 have various repeating data and I need to return > only th

[PHP] MySQL Join

2002-12-31 Thread John Hinton
Stuck on this join temp >From one table I need to mysql_query("CREATE TEMPORARY TABLE temp TYPE=HEAP SELECT DISTINCT field1, field2 FROM $table"); both field1 and field2 have various repeating data and I need to return only the first occurance of the distinct data along with the rest of the dat

RE: [PHP] php/mysql join query help

2002-05-23 Thread John Holmes
Sent: Thursday, May 23, 2002 3:06 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] php/mysql join query help > > The sooner you fix it, the less work you have to do down the road! > > miguel > > On Thu, 23 May 2002, ROBERT MCPEAK wrote: > > > I appreciate you help.

Re: [PHP] php/mysql join query help

2002-05-23 Thread Miguel Cruz
key > per row in table2. If a row has 'blue' twice, only one will be > counted. > > ---John Holmes... > > - Original Message - > From: "ROBERT MCPEAK" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, May 23, 2002

Re: [PHP] php/mysql join query help

2002-05-23 Thread ROBERT MCPEAK
key per row in table2. If a row has 'blue' twice, only one will be counted. ---John Holmes... - Original Message - From: "ROBERT MCPEAK" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 23, 2002 1:22 PM Subject: [PHP] php/mysql join query help

Re: [PHP] php/mysql join query help

2002-05-23 Thread 1LT John W. Holmes
But, the flaw of that is that it'll only count one occurance of table1.key per row in table2. If a row has 'blue' twice, only one will be counted. ---John Holmes... - Original Message - From: "ROBERT MCPEAK" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>

[PHP] php/mysql join query help

2002-05-23 Thread ROBERT MCPEAK
I have a table with a field "key" containing a unique value. I have a second table containing a field called "keys" containg a pipe-delimited list of values from the "key" table. I'd like to do a query that took each value from key, and matched it agains the field "keys" in the second table, and

Re: [PHP] mySQL join query error

2002-04-04 Thread Miguel Cruz
On Thu, 4 Apr 2002, ROBERT MCPEAK wrote: > I get an error with the follow query. There is a field "user" in both > tables, tifrequest & tifexpire. Can anybody see what's wrong with it? > Thanks. > > SELECT * FROM tifrequest LEFT JOIN USING(user) WHERE tifexpire.exp_date > >=2002-04-04 You didn

RE: [PHP] mySQL join query error

2002-04-04 Thread Rick Emery
CPEAK [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:45 AM To: [EMAIL PROTECTED] Subject: [PHP] mySQL join query error I get an error with the follow query. There is a field "user" in both tables, tifrequest & tifexpire. Can anybody see what's wrong with it? T

[PHP] mySQL join query error

2002-04-04 Thread ROBERT MCPEAK
I get an error with the follow query. There is a field "user" in both tables, tifrequest & tifexpire. Can anybody see what's wrong with it? Thanks. SELECT * FROM tifrequest LEFT JOIN USING(user) WHERE tifexpire.exp_date >=2002-04-04 -- PHP General Mailing List (http://www.php.net/) To unsub

[PHP] Mysql join and aliasing with mysql_fetch_object()

2001-08-02 Thread rkirk.com Mail
I'm using a query similar to: select tableA.*, tableB.* from tableA, left join tableB ON tableA.keyfield = tableB.keyfield When I then try to access the column "keyfield", after using mysql_fetch_object() e.g. $resultObject->keyfield I get no value returned. What is the correct way to