Re: [PHP-DB] First letter

2004-04-28 Thread Lang Sharpe
Cornelia Boenigk wrote: > Hi Matt > > You can teat a string like an Array > $first = $string[0]; > $second = $string[1] > and so on. Actually this method is deprecated. The current best way is to use curly braces. $first = $string{0}; $second = $string{1}; Lang -- PHP Database Mailing List

[PHP-DB] Oracle query returning values in sqlplus, but not php.

2003-06-30 Thread Lang Sharpe
Hi all Here is a test version of my script. It queries the data dictionary view ALL_SOURCE. In sqlplus it returns all souce code in the database. In php it returns no rows. The only odd thing about it is that ALL_SOURCE.TYPE is VARCHAR2(12), and 'PACKAGE BODY' is twelve characters long. When I

[PHP-DB] Re: Oracle query returning values in sqlplus, but not php.

2003-07-03 Thread Lang Sharpe
Upon further investigation, I've found that this was a permissions problem. In oracle, a user can see everybody's 'PACKAGE', but only their own 'PACKAGE BODY'. Lang Lang Sharpe wrote: > Hi all > > Here is a test version of my script. It queries th

[PHP-DB] Re: PHP crashing with using Oracle

2003-07-06 Thread Lang Sharpe
I had to change ext/oci8/config.m4 Remove the line highlighted in red on this page. http://cvs.php.net/diff.php/php-src/ext/oci8/config.m4?login=2&r1=1.37.2.6&r2=1.37.2.7&ty=h The line is AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ]) Then do configure/make/make install again. That will get the oci8 su

[PHP-DB] Re: PHP Oci8 segmntation fault

2003-08-14 Thread Lang Sharpe
Hi Radovan Here are some suggestions Make sure $ORACLE_HOME is set in your environment. There may be other environment variables that the environment needs as well that are set for the webserver process, but not when you run the command line version. PHP 4.3.2 has a bug in it that causes php t

[PHP-DB] Re: $_POST in MySQL query issue...

2003-10-16 Thread Lang Sharpe
> $sql="insert into $table set Name = '$_POST["elementName"]'"; The problem with this is that you need to use curly braces around the variable being substituted in the string. Also use single quotes around the array index. $sql="insert into $table set Name = '{$_POST['elementName']}'"; See the

Re: [PHP-DB] $_POST in MySQL query issue...

2003-10-21 Thread Lang Sharpe
The reason curly braces are needed are because you are putting an array element into a string. Consider.. $sBlah = 'blah'; echo "$sBlahfoo$sBlahfoo"; PHP will attempt to echo the variable $sBlahfoo twice. if you use echo "{$sBlah}foo{$sBlah}foo"; you have told php explicitly when to look for

[PHP-DB] Re: Categories and Items query

2003-12-30 Thread Lang Sharpe
Having a Standard only, Deluxe only and Both will lead to problems in the future. (i.e. what if you add in a Basic feature set?) What I would do is 1. Get rid of the "Both" row in feature sets. 2. Have another table called "feature_set_features" or something better. The table has two columns, Th