[thelist] MySQL insert fails

Joel Canfield joel at spinhead.com
Sun Jul 7 19:44:01 CDT 2002


> $Query = "Insert into $TableName values ('0', '$date', '$announce')";
> Print ("the query is: <BR>$Query<p>\n");
> $Result = mysql_db_query($DBName, $Query, $Link);

This worked, and it lets me use my familiar fussy syntax:

$result = mysql_query("INSERT INTO music (id, title, artist, album, genre,
year, rating) VALUES ('NULL', '$title', '$artist', '$album', '$genre',
$year, $rating)",$db);

Thanks again for pointing me in the right direction, Nan.

joel



More information about the thelist mailing list