[BNM] SQL hell
Alan Newman
alan at sensibledevelopment.com
Tue Jul 4 16:08:26 BST 2006
You alias tables in the SELECT part of the statement.
SELECT Table1 as T1, Table2 as T2 ...
FROM T1, T2
WHERE T1.fieldname="foo";
As Wayne suggests you need to go back to the command line and paste the real
SQL output in to check the results...then work back.
- Alan
-----Original Message-----
From: delarge [mailto:delargerock at gmail.com]
Sent: 04 July 2006 16:04
To: Brighton New Media
Subject: Re: [BNM] SQL hell
that was me trying to alias the tables... perhaps I'm going wrong there...
the result I'm getting at the mo is like a SELECT *
I just get everything... as for the flavour... straight up MySQL
5.0database with a PHP twist
maybe I should look at that FROM bit some more...
cheers!
PB
--
BNM info/subscription/archives: http://www.brightonnewmedia.org/
BNM archive search: http://www.roddis.org/bnm/search.php
BNM Del.icio.us tag: http://del.icio.us/tag/bnm/
BNM Flickr group: http://www.flickr.com/groups/bnm/
BNM powered by http://www.screen-play.net/
More information about the BNMList mailing list
BNMList is hosted by Screenlists, a Screen-Play.net service