use php variable within postgresql query

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

 



Readers,

Suppose:

$query=$_GET['databasecolumn'[;

$anotherquery=pg_query($databaseconnection, 'SELECT * FROM
databasename WHERE databasecolumnname="'.$query.';"');

Two errors are reported:

PHP Notice:  Undefined index: databasecolumnname

PHP Warning:  pg_query(): Query failed: ERROR:  column ";" does not exist

Any advice please?

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




[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux