Mysql INSERT query inserts zeroes
Hello StackOverflow,
I have following code:
$ref = do_query("SELECT * FROM issues ");
while($issue_info = mysql_fetch_object($ref)) {
$ref0 = do_query("SELECT id, name, day FROM ids WHERE id =
'".$issue_info->region."' ");
$issue_data = mysql_fetch_object($ref0);
$issue = $issue_info->id;
$w = GetInfo($issue_data->id, $issue_data->name, $region_data->day);
do_query("INSERT INTO all (id, location, issue) VALUES ('NULL', location =
'$location', issue = '$w') "));
}
After do_query(), table 'all' should contains this:
ID: 1 Location: 7 Issue: 66
But instead of this it inserts: ID: 1 Location: 0 Issue: 0 I'm not sure
where my problem is located. $issue returns 7 and $w returns 66
No comments:
Post a Comment