note 29307 rejected from ref.mysql by alindeman

From: Date: Sun, 18 May 2003 02:37:49 +0000
Subject: note 29307 rejected from ref.mysql by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48342@lists.php.net to get a copy of this message
Note Submitter: mijnpc at xs4all dot nl ---- [Editor's Note: it is possible to use multi-dimensional arrays in SQL queries (they are just a double quoted string) by using SELECT * FROM {$whichtable[$whichdb[$which]]} WHERE id = $entry"; ] I found out that you cannot use multidimensional arrays in a SQL-query, e.g. : $sql = "SELECT * FROM $whichtable[$whichdb[$which]] WHERE id = $entry"; this will work fine however : $tempvar = $whichtable[$whichdb[$which]]; $sql = "SELECT * FROM $tempvar WHERE id = $entry"; If it already is a bug, is it in mySQL or PHP ?

« previous php.notes (#48342) next »