RE: [PHP-DB] MySQL error...
| From: | Norland, Martin | Date: | Fri, 10 Dec 2004 20:34:23 +0000 |
| Subject: | RE: [PHP-DB] MySQL error... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37665@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: NIPP, SCOTT V (SBCSI) [mailto:sn4265@sbc.com]
> I have been using a PHP page to update a database table for a
long time now.
> Unfortunately, I have noticed that frequently when I perform an update
I get back an error
> saying "Table 'tablename' doesn't exist". This is becoming more and
more annoying.
[snip]
> $query = "SELECT
id_sys, atime, gid, shell FROM accounts
> WHERE atime
IS NOT NU LL AND ctime
> IS NULL ORDER BY rtime ASC"; $result = mysql_query($query, $Prod) or
die(mysql_error()); ?>
<snip>
Strange behavior, can't say I've ever heard of/seen it - however...
"IS NOT NU LL" is not, strictly speaking, valid sql. If that's not just
a weird line wrapping issue - that may point to part of your problem.
If the error you're getting back is literally "Table 'tablename' doesn't
exist" - then you're looking in the wrong code, and somewhere you have
code that says "tablename" instead of "$tablename". You may want to
grep for "tablename" to try to track that down.
Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.