Re: [PHP-DB] Postgre SQL query error with PHP
Thanks for the help. It is working like it should. Next on the query parameters. Again Thanks for the help. Thomas On 7/2/05, Martín Marqués wrote: > El Sáb 02 Jul 2005 14:21, John DeSoi escribió: > > > > On Jul 2, 2005, at 9:17 AM, Thomas Bonham wrote: > > > > > If you wouldn't mind look over this error to I would be very nice. > > > The error that I'm have now is the following. It is probely very > > > sample, but I'm still learning php so not for me it not. > > > > There is an example here, that I think will help you. > > > > http://www.php.net/manual/en/function.pg-fetch-row.php > > > > And if that does not help try just printing out the entire array so > > you know what is there. > > > > See the var_dump function: > > > > http://us2.php.net/manual/en/function.var-dump.php > > > > I personally think he should start here: > > http://pear.php.net/manual/en/package.database.db.php > > > -- > select 'mmarques' || '@' || 'unl.edu.ar' AS email; > - > Martín Marqués | Programador, DBA > Centro de Telemática| Administrador >Universidad Nacional > del Litoral > - > -- -- Thomas Bonham [EMAIL PROTECTED] bonhamlinux.org Cell 602-402-9786 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Postgre SQL query error with PHP
El Sáb 02 Jul 2005 14:21, John DeSoi escribió: > > On Jul 2, 2005, at 9:17 AM, Thomas Bonham wrote: > > > If you wouldn't mind look over this error to I would be very nice. > > The error that I'm have now is the following. It is probely very > > sample, but I'm still learning php so not for me it not. > > There is an example here, that I think will help you. > > http://www.php.net/manual/en/function.pg-fetch-row.php > > And if that does not help try just printing out the entire array so > you know what is there. > > See the var_dump function: > > http://us2.php.net/manual/en/function.var-dump.php > I personally think he should start here: http://pear.php.net/manual/en/package.database.db.php -- select 'mmarques' || '@' || 'unl.edu.ar' AS email; - Martín Marqués | Programador, DBA Centro de Telemática| Administrador Universidad Nacional del Litoral - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Postgre SQL query error with PHP
On Jul 2, 2005, at 9:17 AM, Thomas Bonham wrote: If you wouldn't mind look over this error to I would be very nice. The error that I'm have now is the following. It is probely very sample, but I'm still learning php so not for me it not. There is an example here, that I think will help you. http://www.php.net/manual/en/function.pg-fetch-row.php And if that does not help try just printing out the entire array so you know what is there. See the var_dump function: http://us2.php.net/manual/en/function.var-dump.php John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Postgre SQL query error with PHP
Thank. The grant work. If you wouldn't mind look over this error to I would be very nice. The error that I'm have now is the following. It is probely very sample, but I'm still learning php so not for me it not. Error: Connection to Data Base established Notice: Uninitialized string offset: 1 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 27 Notice: Uninitialized string offset: 2 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 28 Notice: Uninitialized string offset: 3 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 29 Notice: Uninitialized string offset: 4 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 30 Notice: Uninitialized string offset: 5 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 31 Notice: Uninitialized string offset: 6 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 32 Notice: Uninitialized string offset: 7 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 33 Notice: Uninitialized string offset: 8 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 34 Notice: Uninitialized string offset: 9 in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 35 data: 1, , , , , , , , , , It prints the first one then it errors. Thank agin Thomas On 7/2/05, John DeSoi <[EMAIL PROTECTED]> wrote: > > On Jul 1, 2005, at 9:37 PM, Thomas Bonham wrote: > > > Error: > > Connection to Data Base established > > Warning: pg_query(): Query failed: ERROR: permission denied for > > relation property in > > /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on > > line 20 > > > > Warning: Wrong parameter count for pg_num_rows() in > > /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on > > line 21 > > > > As it show above I can connect to the database but no query. > > The part of the code that is error "I Think" is the following. > > $query = pg_query (" > > SELECT * FROM property > > "); > > > The first error is telling you that you don't have permission to > select from the "property" table. See the GRANT command and make sure > you have the correct permissions to work with the table. > > The warning needs to be fixed also. The pg_num_rows command only > takes one parameter. You need to remove the $dbconn parameter. > > > John DeSoi, Ph.D. > http://pgedit.com/ > Power Tools for PostgreSQL > > -- -- Thomas Bonham [EMAIL PROTECTED] bonhamlinux.org Cell 602-402-9786 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Postgre SQL query error with PHP
On Jul 1, 2005, at 9:37 PM, Thomas Bonham wrote: Error: Connection to Data Base established Warning: pg_query(): Query failed: ERROR: permission denied for relation property in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 20 Warning: Wrong parameter count for pg_num_rows() in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 21 As it show above I can connect to the database but no query. The part of the code that is error "I Think" is the following. $query = pg_query (" SELECT * FROM property "); The first error is telling you that you don't have permission to select from the "property" table. See the GRANT command and make sure you have the correct permissions to work with the table. The warning needs to be fixed also. The pg_num_rows command only takes one parameter. You need to remove the $dbconn parameter. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Postgre SQL query error with PHP
Hello All, I'm having a problem setting up the query with postgreSQL. I can do what I won't for the command line but it error when I try it with the PHP functions. My errors and code are below. CODE: \n"; } pg_close($dbconn); ?> Error: Connection to Data Base established Warning: pg_query(): Query failed: ERROR: permission denied for relation property in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 20 Warning: Wrong parameter count for pg_num_rows() in /var/www/html/thomas/cis166ae/database/web_users/dan/newrow.php on line 21 As it show above I can connect to the database but no query. The part of the code that is error "I Think" is the following. $query = pg_query (" SELECT * FROM property "); Thanks for the help. Thomas -- -- Thomas Bonham [EMAIL PROTECTED] bonhamlinux.org Cell 602-402-9786 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php