Re: Re: [PHP-DB] what is wrong with my code.. please help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



S Kumar wrote:

Dear group, I am trying to query my db and print the results.


when i execute my script, i am not getting any
result
except a blank page. can any one please help me what
is going wrong with my script. Script:
$conn = pg_connect("user = $user dbname = $dbname
host
= $host password = $pass");
if (!$conn)
{
echo('could not establish connection with
database <br>');
exit;
}
$sql = "select * from experiment;"
$sth = pg_exec($connect,$sql)

You are missing ; after the above two lines.

Please use a php syntax aware editor to avoid these problems.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux