I\'m trying to run the following PHP script to do a simple database query:
$db_host = \"localhost\";
$db_name = \"showfinder\";
$username = \"user\";
$passwo
Easiest workaround is Just change the table name and all column names to lowercase and your issue will be resolved.
For example:
Table_Name
to table_name
and ColumnName
to columnname
You have to add the schema first e.g.
SELECT * FROM place.user_place;
If you don't want to add that in all queries then try this:
SET search_path TO place;
Now it will works:
SELECT * FROM user_place;
I had a similar problem on OSX but tried to play around with double and single quotes. For your case, you could try something like this
$query = 'SELECT * FROM "sf_bands"'; // NOTE: double quotes on "sf_Bands"
I had problems with this and this is the story (sad but true) :
If your table name is all lower case like : accounts
you can use: select * from AcCounTs
and it will work fine
If your table name is all lower case like : accounts
The following will fail:
select * from "AcCounTs"
If your table name is mixed case like : Accounts
The following will fail:
select * from accounts
If your table name is mixed case like : Accounts
The following will work OK:
select * from "Accounts"
I dont like remembering useless stuff like this but you have to ;)
If a table name contains underscores or upper case, you need to surround it in double-quotes.
SELECT * from "Table_Name";
Put the dbname parameter in your connection string. It works for me while everything else failed.
Also when doing the select, specify the your_schema
.your_table
like this:
select * from my_schema.your_table