Cannot simply use PostgreSQL table name (“relation does not exist”)

后端 未结 11 2804
一向
一向 2020-11-22 05:35

I\'m trying to run the following PHP script to do a simple database query:

$db_host = \"localhost\";
$db_name = \"showfinder\";
$username = \"user\";
$passwo         


        
11条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-22 05:58

    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"
    

提交回复
热议问题