note 75391 deleted from function.mysql-fetch-assoc by mazzanet

From: Date: Sun, 27 May 2007 09:32:11 +0000
Subject: note 75391 deleted from function.mysql-fetch-assoc by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-126943@lists.php.net to get a copy of this message
Note Submitter: OiNK ---- "Adding alias names in MySQL isn't easy, because you can't ask for SELECT table1.otherfield AS table1otherfield, * FROM table1 LEFT JOIN table2 ON table1.somefield=table2.somefield You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM table1 LEFT JOIN table2 ON table1.somefield=table2.somefield" Why not fix your SQL instead of writing some pointless function? SELECT table1.otherfield AS table1otherfield, table1.*, table2.* FROM table1 LEFT JOIN table2 ON table1.somefield=table2.somefield;

« previous php.notes (#126943) next »