Forum Moderators: coopster

Message Too Old, No Replies

webcal_user' doesn't exist

         

danny_s

11:38 am on Jul 7, 2005 (gmt 0)

10+ Year Member



what does this error mean?

"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

jatar_k

4:22 pm on Jul 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



this from mysql? is it a missing table?

I am not really sure, not really enough info.

are you issuing an update query? and this being returned from mysql?

What is the query that causes this?

danny_s

4:37 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



yes this is when i try to update a record in a mysql table.

the record does get updated but i get therror message

'eastbank_s.webcal_user'

and then the page hangs.

the db is call "eastbank_s"

regards
Danny

jatar_k

4:45 pm on Jul 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



what is your query?

it looks like it may have a bad table in it.

danny_s

5:19 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



this seems to be it

$calquery = "UPDATE webcal_user SET cal_email = '$agentelmail' WHERE cal_login='$agent'";

when i comment it out i get this error instead

Editing field 57...Agent #57 has been updated...Query was empty

im new to this so a bit confused, thanks for you help
regards
Danny

jatar_k

5:30 pm on Jul 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



is that tablename correct? From the error in your first post it shouldn't exist, I am not sure how it is getting updated if mysql is saying it doesn't exist.

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.

danny_s

5:49 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



this is the code

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

jatar_k

5:55 pm on Jul 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



ah, I think I see,

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

danny_s

6:08 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



jatar_k

thanks alot
i couldnt find the table in the db so i comented that bit out and it now works.

thanks big time for the help, im learning alot (im sure ill be back)

cheers
Danny

jatar_k

6:13 pm on Jul 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



glad to help