Forum Moderators: coopster
"Editing field 56...Agent #56 has been updated...Table 'eastbank_s.webcal_user' doesn't exist"
i get this when i try to update a record, the record updates but i get this and the page hangs.
when i refresh the page i see that the record has been changed.
any help would be great
Thanks
Danny
Are you updating multiple tables or just that one?
and are you sure the table itself is getting updated? How are you sure it is updated?
do you select the data again when you reload the page? if so, maybe post that select query as well.
i know it updated because when I load the page with the output on it has changed.
//MODIFY A RECORD
if ($modify!= "")
{
print "Editing field $modify...";
//add slashes to input so things don't get #*$!ed up in mySQL
$agent = addslashes($agent);
$notes = addslashes($notes);
//formats the description text, if necessary
if ($linefeeds == "Y")
{
$notes = ereg_replace("(\r\nŠ\nŠ\r)", "<br>", $notes);
}
$query = "UPDATE agents SET agent = '$agent', agenturl = '$agentwww', agentemail = '$agentelmail', notes = '$notes', agentphone = '$agentphone', agentcell = '$agentcell', agentfax = '$agentfax' WHERE id='$current_user'";
if (!mysql_query ($query, $link) )
{
die (mysql_error());
}
print "Agent #$modify has been updated...";
//COLLECT INFORMATION ABOUT THE CURRENT USER
$result = mysql_query("SELECT * FROM agents WHERE id='$modify';",$link);
while ($a_row =mysql_fetch_array ($result) )
{
$agent = $a_row[agent];
}
$calquery = "UPDATE webcal_user SET cal_email = '$agentelmail' WHERE cal_login='$agent'";
if (!mysql_query ($calquery, $link) )
{
die (mysql_error());
}
print "$agent email has been updated...";
}
thanks
Danny
the update that is working is this one
$query = "UPDATE agents SET agent = '$agent', agenturl = '$agentwww', agentemail = '$agentelmail', notes = '$notes', agentphone = '$agentphone', agentcell = '$agentcell', agentfax = '$agentfax' WHERE id='$current_user'";
the second update is not working at all from what I can tell
$calquery = "UPDATE webcal_user SET cal_email = '$agentelmail' WHERE cal_login='$agent'";
that is actually die'ing and showing mysql_error(), which is the table does not exist message
do you have phpmyadmin or do you use something else to manage mysql?
look through the tablenames in your db and see if webcal_user is there or maybe it is spelled differently such as webcal_users
that is where your problem is