Re: [PHP-DB] PHPMySQL left/substring etc problem

2005-04-19 Thread Andrés G . Montañez
But when I tried, select left (loc1,3) from openart_table where.. Try without the space between 'left' and '(', I mean... LEFT(loc1, 3) where loc1 is the name of the column, and 3 the characters you want to show. -- Atte, Andrés G. Montañez Técnico en Redes y Telecomunicaciones Montevideo

RE: [PHP-DB] PHPMySQL left/substring etc problem

2005-04-19 Thread Juffermans, Jos
If you do "SELECT LEFT(loc1,3) FROM openart_table" the column name in $row (Bis probably not "loc1". Try this: "SELECT LEFT(loc1,3) AS loc1 FROM (Bopenart_table". Also, after the fetch you can do some debuggin thru this: (B (B?php (B$row = mysql_fetch_assoc($result); // change $result

[PHP-DB] php4 can't find tnsnames.ora oracle9 but can connect if description hardcoded

2005-04-19 Thread neil smith
Hello, I have test script that can connect to the oracle database. It doesn't require tnsnames.ora because I define the database alias in the script itself. It looks like this: echo TWO_TASK=.getenv(TWO_TASK).br; echo LD_LIBRARY_PATH=.getenv(LD_LIBRARY_PATH).br; echo

[PHP-DB] Losing the ability to connect to Oracle database

2005-04-19 Thread Leo D. Geoffrion
I recently upgraded to PHP5 and now have a curious Oracle problem. The PHP scripts query the database fine. Then overnight, the database shuts down for backup and restarts. The next day, PHP can no longer connect to the database until I restart Apache. Then, it's happy until Oracle restarts

Re: [PHP-DB] php4 can't find tnsnames.ora oracle9 but can connect if description hardcoded

2005-04-19 Thread Christopher Jones
Make sure the environment variables are set in the shell that starts Apache. See http://www.oracle.com/technology/tech/opensource/php/php_troubleshooting_faq.html#envvars Try changing your OCILogon command to $odbc = OCILogon(yourusername,yourpassword,$db); i.e. remove /test from the username

Re: [PHP-DB] Losing the ability to connect to Oracle database

2005-04-19 Thread Christopher Jones
Leo D. Geoffrion wrote: I recently upgraded to PHP5 and now have a curious Oracle problem. The PHP scripts query the database fine. Then overnight, the database shuts down for backup and restarts. The next day, PHP can no longer connect to the database until I restart Apache. Then, it's happy