Table does not exist, but it does exist
Your query has several syntax errors including wrong JOIN
s and accessing your columns with/without backticks inconsistently.
I've tried to improve it and here it is:
SELECT
c.`FirstName`, c.`LastName`, c.`Street`, c.`Apartment`, c.`City`,
c.`State`, c.`zip`, c.`Homephone`, c.`Cellphone`, c.`Otherphone`,
d.`name`, d.`Description`, d.`price`,
so.`DonutOrderID`, d.`DonutID`, so.`specialNotes`, c.`CustomerID`, o.`date`
FROM `SalesOrder` so
INNER JOIN `SalesOrderDetails` sod ON so.`DonutOrderID` = sod.`DonutOrderID`
INNER JOIN `Customer` c ON so.`CustomerID` = c.`CustomerID`
INNER JOIN `Donut` d ON d.`DonutID` = sod.`DonutID`
MySQL Table does not exist error, but it does exist
Basically, I believe the problem that I was experiencing was due to differing password hash lengths. In my case, I got a new server, did a complete mysql dump on it which transferred passwords and user info also. The new server was already initialized with a root user that had a 16char length hash, but my old server was using the newer 32 char hash lengths.
I had to go into my.conf set the old passwords setting to 0 (other wise every time I tried updating the database, the new update was 16 chars in length). I then updated all the passwords to be the same via the command UPDATE mysql.user SET password=PASSWORD('password here');
, then I flushed privileges.
Obviously, having every user with the same password is a really bad idea, so I changed them one by one after I confirmed that it was working.
I typed up a blog entry that goes into some of the other things I did that didn't work here, before I happened upon this solution (just in case one or more of those changes effected my outcome) however, I think that the above solution to be complete... but I haven't tried to reproduce the error so I can't be 100% sure.
Try to describe my table but it said does not exist this table however it does
Somehow you managed to create tables with wrong quotes attached.
There is a table in your DB called
’cms_news‘
but you search for
cms_news
Rename (or delete) all your tables and don't use ’
to escape names. Use backticks if you have to:
`cms_news`
But even backticks are only required for table names containing special characters or using reserved names in the DB.
Related Topics
HTML 5 Multi File Upload with PHP
Comparing Passwords with Crypt() in PHP
Convert Number into Xx.Xx Million Format
How to Move an Array Element with a Known Key to the End of an Array in PHP
How to Iterate Through Dom Elements in PHP
Which Is the Best Character Encoding for Japanese Language for Db, PHP, and HTML Display
How to Insert into MySQL Using a Prepared Statement with PHP
How to Set Curlopt_Cainfo Globally for PHP
PHP Pdo. Error Number '00000' When Query Is Correct
Subtracting a Certain Number of Hours, Days, Months or Years from Date
Using the Browser Prompt to Download a File
Change Tag Attribute Value with PHP Domdocument
Http://Localhost/ Not Working on Windows 7. What's the Problem
PHP Image Resize on the Fly VS Storing Resized Images
Work-Around for PHP5's Pdo Rowcount MySQL Issue