What is diff between SQL .... VALUES ($a.$b) and SQL .... VALUES (a,b)?
| From: | Jan Holland | Date: | Mon, 03 Sep 2001 17:29:43 +0000 |
| Subject: | What is diff between SQL .... VALUES ($a.$b) and SQL .... VALUES (a,b)? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1420@lists.php.net to get a copy of this message | ||
Or ....
why do my table-record-fields stay unfilled?
I got a project (PHP/MySQL on Apache) left behind by a programmer
who used Smarty.
Basically the problem is
to get a form.elements-array into a row of a database and
back into a listing.
I made a testset found on the harddisk.
The original functioned somewhat.
After clumsying around i constructed this testset:
$sql = "INSERT INTO messages (timestamp, n1type, n6doel )";
$sql .= "VALUES (unix_timestamp() . $n1type . $n6doel )";
It gives this message:
Database error.
MySQL Error: 1064 (You have an error in your SQL syntax near ' reg', , 'noUrl', , ' at line 2)
'reg' and 'noUrl' are contents in the form of $n1type and $n6doel
When i change this to:
$sql = "INSERT INTO messages (timestamp, n1type, n6doel)";
$sql .= "VALUES (unix_timestamp() , n1type , n6doel )";
I do not get an error message, but
confirmation that the data were correctly transmitted.
However, the record-fields are empty :-)
My hypothesis:
somewhere the $VALUE entities are not loaded (anymore)
with the correct data.
But i dont understand where and what to look for
in the form1.php fil;e or other files.
TIA for any effort sóne takes.
Regards
Jan Holland