RE: [PHP] FATAL call to undefined function pg_query()
> -Original Message- > From: Steve G [mailto:[EMAIL PROTECTED]] > Sent: 29 May 2002 13:47 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] FATAL call to undefined function pg_query() > > > I'm using 4.0.6. That would explain it... > > So how does one using 4.0.6 perform a query on a postgres > database? I think > it's pg_exec. However, my manual is for the newest versions > of PHP. Is the > syntax the same? Is there an older manual out there? Well, the online manual entry at http://www.php.net/manual/en/function.pg-query.php includes this: Note: This function used to be called pg_exec(). pg_exec() is still available for compatibility reasons but users are encouraged to use the newer name. so I guess you can assume that otherwise it's exactly the same! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FATAL call to undefined function pg_query()
On Wednesday 29 May 2002 20:47, Steve G wrote: > I'm using 4.0.6. That would explain it... > > So how does one using 4.0.6 perform a query on a postgres database? I > think it's pg_exec. However, my manual is for the newest versions of PHP. > Is the syntax the same? Is there an older manual out there? > > Thanks! That definitely answeres that question. Don't quote me on this (!) but I think that the functions have simply been renamed to bring them in line with the other db functions (like mssql_query, mysql_query etc). Thus the syntax and usage should remain the same. Anyway it doesn't hurt to try. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Poland has gun control. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FATAL call to undefined function pg_query()
I'm using 4.0.6. That would explain it... So how does one using 4.0.6 perform a query on a postgres database? I think it's pg_exec. However, my manual is for the newest versions of PHP. Is the syntax the same? Is there an older manual out there? Thanks! That definitely answeres that question. -steve - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 11:17 PM Subject: Re: [PHP] FATAL call to undefined function pg_query() > On Wednesday 29 May 2002 11:37, Steve G wrote: > > > Fatal error: Call to undefined function: pg_query() in > > /var/www/html/steve/frontdoor.php on line 42 > > > but for some reason pg_query gives me an undefined function. What gives?? > > Is this function not valid? The manual says it is.. I think my syntax is > > correct... > > > > Line 42 -> pg_query("select * from users", $link); > > What version of php are you using? pg_query is only available for PHP 4 >= > 4.2.0 > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > You should never bet against anything in science at odds of more than > about 10^12 to 1. > -- Ernest Rutherford > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FATAL call to undefined function pg_query()
On Wednesday 29 May 2002 11:37, Steve G wrote: > Fatal error: Call to undefined function: pg_query() in > /var/www/html/steve/frontdoor.php on line 42 > but for some reason pg_query gives me an undefined function. What gives?? > Is this function not valid? The manual says it is.. I think my syntax is > correct... > > Line 42 -> pg_query("select * from users", $link); What version of php are you using? pg_query is only available for PHP 4 >= 4.2.0 -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* You should never bet against anything in science at odds of more than about 10^12 to 1. -- Ernest Rutherford */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FATAL call to undefined function pg_query()
Hello, I don't know exactly why I'm getting this output: Fatal error: Call to undefined function: pg_query() in /var/www/html/steve/frontdoor.php on line 42 I can successfully connect to my db using: $link = pg_connect ("host=localhost dbname=$dbname user=$user"); And I even get the proper Database name using: echo pg_db_name(); but for some reason pg_query gives me an undefined function. What gives?? Is this function not valid? The manual says it is.. I think my syntax is correct... Line 42 -> pg_query("select * from users", $link); Can anyone help me? Thanks! -steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php