Page 1 of 1
Help! MySQL Error
Posted: Sun Jun 20, 2004 3:09 am
by RadixDev
Code: Select all
mysql_query("INSERT INTO ".$prefix."_reset (uniqueid,username) VALUES('".$uniqueid."','".$_POSTї'username']."')");
For some reason this does not work
i have cheked the values for each variables there are both correct but it does not get added to the database. Tried adding to the db manually through console but won't do it... Any ideas?
Posted: Sun Jun 20, 2004 3:12 am
by markl999
What does the below output?
Code: Select all
mysql_query("INSERT INTO ".$prefix."_reset (uniqueid,username) VALUES('".$uniqueid."','".$_POSTї'username']."')") or die(mysql_error());
Posted: Sun Jun 20, 2004 3:13 am
by RadixDev
nothing... that's the problem
Posted: Sun Jun 20, 2004 3:16 am
by feyd
Code: Select all
<?php
ini_set('display_errors','1');
error_reporting(E_ALL);
$query = mysql_query("INSERT INTO ".$prefix."_reset (uniqueid,username) VALUES('".$uniqueid."','".$_POST['username']."')") or die(mysql_error());
echo $query."; rows affected: ".mysql_affected_rows()."\n";
?>
what about this then?
[edit]made a slight change to force errors to show, just in case
[/edit]
Posted: Sun Jun 20, 2004 3:17 am
by markl999
Might also want to show some surrounding code, maybe it's not even getting to the query? *shrug*