[PHP-DB] problem in parsing

2002-08-09 Thread J-E-N
if i have the following script, $exp = description=whatever\namount=23.50\nquantity=2\n; if (eregi((amount)(.*)(\n), $exp,$amt)) { print $amt[0]; } the output will be namount=23.50\nquantity=2\n what will i do so that the output value will be 23.50 only. thanks =) jen

Re: [PHP-DB] problem in parsing

2002-08-09 Thread [EMAIL PROTECTED]
On Fri, 9 Aug 2002, J-E-N wrote: Hi! This one: $exp = description=whatever\namount=23.50\nquantity=2\n; if (preg_match(/amount=([0-9]{1,9}\.[0-9]{1,9})(\n)/, $exp,$amt)) { print $amt[1]; } will output 23.50 and this one: $exp = description=whatever\namount=23.50\nquantity=2\n; if

[PHP-DB] Supplied argument is not a valid MySQL result resource

2002-08-09 Thread MET
I'm getting some massive errors on some pretty simple code. Included are the errors as well as the PHP function that is giving me issues. Any help would be greatly appreciated. And the weirdest thing, is that the code used to work ?? Line 267 is equal to this PHP line:

Re: [PHP-DB] Supplied argument is not a valid MySQL result resource

2002-08-09 Thread Jeffrey_N_Dyke
add an... or die(mysql_error()) to the $resultm = mysql_query($sqlm); statement and you'll have a lot more info for yourself, and the list if you still need assistance.

[PHP-DB] Re: OCIStmtExecute: ORA-01008: not all variables bound on Anonymous PL/SQL

2002-08-09 Thread Prince
Hi, Does anyone know how to get this done? Thanks, Prince [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I have the sample php program. While trying to execute, I get the above mentioned error. SQL create type typ_numbertab TABLE OF number(12); % cat mytest.php

[PHP-DB] Variables Not Staying Set

2002-08-09 Thread MET
...slightly in regards to my last email. I have a database query which requires a variable ( $USER[$id][cbannerID] ) to be equal to the ID of the current banner being viewed. If you've come to the page for the first time my script gives that variable a default value of -1 .

[PHP-DB] odbc connect problem

2002-08-09 Thread chip . wiegand
I am attempting for the first time, to connect from freebsd/mysql/php box to a NT box running MAS200. I am able to connect from another NT workstation with Access and download data, so I am trying from FreeBSD now. When I run the code below I get error: Fatal error: Call to undefined function:

Re: [PHP-DB] odbc connect problem

2002-08-09 Thread Chip Atkinson
It looks like you didn't build php with odbc support. Try putting in a call to phpinfo (); and see if it says that odbc support is compiled in. (Another) Chip On Fri, 9 Aug 2002 [EMAIL PROTECTED] wrote: I am attempting for the first time, to connect from freebsd/mysql/php box to a NT box

Re: [PHP-DB] odbc connect problem

2002-08-09 Thread chip . wiegand
Yeah, you're right, I see I need to add --with-iodbc. Now another question - when I recompile to add this support, do I have to add all the other options that I originally had listed? Or can I add just this one and everything else will be left the same? What about php.ini? Will it be changed? --

Re: [PHP-DB] odbc connect problem

2002-08-09 Thread salamander
Chip, You are going to have to rebuild the dso with the options you specified before - try cutting and pasting the configure that shows up in your phpinfo() to make it easier. Also, you can get the necessary iODBC header files at www.iodbc.org, as well as find a HOWTO there for compiling

Re: [PHP-DB] odbc connect problem

2002-08-09 Thread salamander
Chip, I wonder if you set the ODBCINI environment variable with the putenv()? If you could show the code in your odbctest.php file that would be helpful. Actually, I'll be traveling to Linuxworld on Monday - anyone wants to chat about ODBC who will be there feel free to drop me an email.

[PHP-DB] Ranking in MySQL

2002-08-09 Thread David Balatero
I have a MySQL table called images, each with a rating from 1-10. The column is a decimal(10,2). For simplicity's sake, let's say i have the following: CREATE TABLE images ( image_id int not null auto_increment, image_path varchar(255) not null, rating decimal(10,2) not null, primary

Re: [PHP-DB] Ranking in MySQL

2002-08-09 Thread Mihail Bota
David, Your question is a little bit unclear. First, if it is rank, you do not need decimal, but integer (tinyint will do it). Then you need a little bit of statistics to rank the picture against the others, so, anytime each picture is ranked, you have to run the statistics and update the table

[PHP-DB] PHP and Exel

2002-08-09 Thread Nuno Fernandes
Hello all I'm want to now if its possible to read a exel file using PHP and then populate a Mu Sql database whit the information of the exel file, if its possible what are the steps to do it? Thanks for you colaboration Nuno Fernandes NLF Software -- PHP Database Mailing List

[PHP-DB] Tutorials

2002-08-09 Thread Shoulder to Shoulder Farm
Hi all, Does anyone know where I can get beginner tutorials on PHP and MySQL? Thanks, Taj -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php