note 17175 deleted from language.variables.variable by jimw
| From: | jimw@php.net | Date: | Mon, 17 Dec 2001 23:28:45 +0000 |
| Subject: | note 17175 deleted from language.variables.variable by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23089@lists.php.net to get a copy of this message | ||
Be careful when using variable variables with MySQL. Avoid the following:
INSERT INTO mytable VALUES ('1', '$$myvar')
This will not insert the variable data as it should be. Instead, set a new variable equal to the
variable variable, and then insert that. For example:
$temp_var = $$myvar;
INSERT INTO mytable VALUES ('1', '$temp_var')