Hi all,
Thanks for the CREATE TABLE help now the next problem.
The query below always dies. $newtab contains the name of the table which has been created. I tried the formats given as solution for the previous problem (double quotes or single quotes with string concatenation) but neither works. Advice needed.
Mike
$query = "INSERT INTO $newtab
(booknumber)
VALUES
($booknumber)";
$result = mysql_query($query)
or die('nothing doing');
Thanks Guido, that certainly gives useful information and it tells me:
mysql error Column count doesn’t match value count at row 1 in query INSERT INTO Fotografie (booknumber) VALUES ()
while the query seems ok: $newtab content is ok and valid as is $booknumber as far as I can see. Is this part of the error message - VALUES () - telling me that the $booknumber is empty or something?
Thanks.
$query = "INSERT INTO $newtab
(booknumber)
VALUES
($booknumber)";
$result = mysql_query($query)
or die('mysql error ' . mysql_error() . ' in query ' . $query);