can anyone see what i did wrong? affected rows displays -1 and i have included my common_db.inc.php file to make sure it connects to the db. i can do SELECT queries fine and the login/pass user in my common_db.inc.php file is the dba.PHP Code:$sqlq = "INSERT INTO survey SET
name='$title',
desc='$desc',
rel_uid='$user',
state='$state',
start='$start',
end='$end'";
//mysql_query($sqlq);
if(@mysql_query($sqlq))
{
echo("your entry has been added.");
}
else
{
echo("Error");
}
echo mysql_affected_rows();
looks like 2 of my fields (desc & end) are keywords for mysql. how do i escape them? i've already tried quoting them and putting a leading \ but both didn't work. i like the set way of doing things cause it's easier to follow than the (fields, in, here) values (values, over, there)





Bookmarks