|
Posted by zek2005 on 02/11/07 13:53
I have a problem with an insert. The connection to DB works fine and I
receive an OK when the PHP process but nothing is inserted in the DB.
I added an echo of mysql_affected_rows and the result is -1. That's
why I get an OK?
$query="INSERT INTO preguntas (pregunta, id_usuario, fecha) VALUES
('$pregunta','$id',current_date)";
$result=mysql_db_query($database,$query,$link);
if(mysql_affected_rows($link))
{
echo "OK";
}
else
{
echo "Nothing inserted";
}
Thanks for your help
Ezequiel
Navigation:
[Reply to this message]
|