FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


mySQL doesn't see a table that IS THERE





PMK-Bear
Show below is a mixed screen capture of the error.


(thumbnail, click for big image)
My code is rather simple:

  • connect to the database (verbose errors, just in case)
  • select database (shown censored, just in case)
  • select * from generos
  • keep going on

But when I do the above described, the webserver returns the message shown on the upper part of the image. As you can see from the lower part, it is actually there. WTF?

Can anyone please tell me what happens?
Oh, and more on that.
The following diagnostics code:
Code:

<?php
$con = mysql_connect('127.0.0.1',' _root','password') or die(mysql_error());
$db = mysql_select_db('_cmv3') or die(mysql_error());

$query = "SHOW TABLES FROM _cmv3";
$query = mysql_query($query) or die(mysql_error());

 while($row=mysql_fetch_row($query)){
  var_dump($row);
 }
?>

returns this:
Code:

array(1) {
  [0]=>
  string(7) "generos"
}
array(1) {
  [0]=>
  string(5) "items"
}
array(1) {
  [0]=>
  string(8) "usuarios"
}

Which is appropriately showing that the tables ARE THERE. Then, WTF is going on with what's shown above?
PMK-Bear
Found the problem: I was mixing my case. The table's name is lowercase and I was typing it uppercase. In the end, it turned up just a PEBKAC condition, but PLEASE, PLEASE PLEASE could you make this type of stuff somehow explicit so that people like me don't stumble upon this errors each day or so?
PMK-Bear
When I store something I expect it to be UTF-8 (since I've set the table's collation to be such) and then try to view it as UTF-8 again, some characters won't show up, or will show up mangled. Why is that? And more importantly, how do I solve it?
Related topics
mySQL create table problem (parse error)..
mysql database table structure
PHP MYSQL sorted table
Defalut Value in MySql
[MySQL (& php)] += in SQL?
Working with Excel, PHP & MySQL. Any Ideas
150 frih to make this SIMPLE script
MySQL, PHP and APACHE
Problem with NAVICAT 8 for mysql
MySQL Date Addition with Variable Interval Type
Help with mysql query
Blog Hosting
SQL creating limited user
ekinboard forum
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.