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
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
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
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
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
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