Hi, I'm having a problem with a database query, where the script is simply inserting some data into an empty table. The following code creates the query string to be used, the values are all gathered from an html form: $query = "INSERT INTO $lcstage (id, ".$fieldNames.") VALUES (".$clientID.",".$values.")"; The finishing querystring, if printed lookks like this: INSERT INTO myfamily (id, fathers, mothers, brothers, sisters, grandfathers, grandmothers, ggrandfathers, ggrandmothers, aunts, uncles, godparents) VALUES (36,'1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1') However, I get a database error every time informing me the query could not be performed. To test the query I've pasted the printed query string into phpMyAdmin and it works first time every time. So if there's nothing wrong with the query string or the database, what else could be causing this error? -- Jamie Saunders Media Architect phpdev@mediacdcards.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php