[PHP-DB] Re:SQL type queries on arrays?

2003-10-21 Thread Neil Smth
Why not use an actual SQL query which is optimised to be faster than string processing ? You would probably get more mileage from loading the CSV into a pre-formed table with an index, in MySQL (this operation is very fast). I've loaded 5000 records from a CSV in 5 millisec into MySQL on a

Re: [PHP-DB] Help with file upload

2003-10-21 Thread bunmi
Hello Neil, I want to really thank you. You cracked my month long problem for me. The destination path was supposed to be the absolute path: /home/ayserve/public_html/fu/ It is working fine now. Regards, Bunmi Neil Smth wrote: At 18:44 16/10/2003 +, you wrote: From: Ruprecht Helms [EMAIL

Re: [PHP-DB] Load MySQL from a variable

2003-10-21 Thread Rory McKinley
Hi Kim AFAIK, LOAD DATA INFILE will only work off a file. So you would have to create a temp file. Another option is to create a multiple value insert query e.g. INSERT INTO arb_table (arb_column_1...arb_column_n) VALUES (arb_value_1..arb_value_n), (arb_value_1..arb_value_n), . Although

Re: [PHP-DB] Load MySQL from a variable

2003-10-21 Thread CPT John W. Holmes
From: Kim Kohen [EMAIL PROTECTED] I have some data from Filemaker Pro which needs to have a lot of search/replacing done before importing into MySQL. I have used ereg_replace in PHP and end up with a variable holding the correct data. (there are several hundred rows of data in the variable)

Re: [PHP-DB] Load MySQL from a variable

2003-10-21 Thread CPT John W. Holmes
From: Rory McKinley [EMAIL PROTECTED] AFAIK, LOAD DATA INFILE will only work off a file. So you would have to create a temp file. Another option is to create a multiple value insert query e.g. INSERT INTO arb_table (arb_column_1...arb_column_n) VALUES (arb_value_1..arb_value_n),

[PHP-DB] using href=abc.php/?day=......

2003-10-21 Thread Mücella Erdem Efe
Hi; I need to use a href=abc.php/?day=.. /a statement in a xxx.php file. I have to use a php variable on the right of the day variable like a href=abc.php/?day=+?echo $start_day;? /a. When i get this variable in abc.php file if (phpversion() = 4.1.0) { $vars =

RE: [PHP-DB] acquiring value from a sql statement which contains an alias

2003-10-21 Thread Hutchins, Richard
Shahmat, I have the following table in my MySQL db: mysql describe news; +---+--+--+-+-++ | Field | Type | Null | Key | Default | Extra |

RE: [PHP-DB] Table locking to prevent duplicate inserts?

2003-10-21 Thread Mayo, Chuck
John, Thanks much for the excellent tips, I guess I was trying to make it too difficult. We're working on the SQL and indexes to alleviate the slowdowns and I don't expect this to really be an issue in the future, it just concerned me that it was even possible... I thought I'd coded it better

[PHP-DB] Error settings

2003-10-21 Thread Dillon, John
How do I get rid of the undefined variable errors I get on a new (default) set up of Apache 1.3.28/PHP4.3.2 (without re-writing the code). It works on the internet on my host providers server but I am running this on localhost. I also get undefined offset error. Regards, John

[PHP-DB] Re: using href=abc.php/?day=......

2003-10-21 Thread pete M
a href=abc.php/?day=?echo $start_day;?/a pete MüCella Erdem Efe wrote: Hi; I need to use a href=abc.php/?day=.. /a statement in a xxx.php file. I have to use a php variable on the right of the day variable like a href=abc.php/?day=+?echo $start_day;? /a. When i get this variable in

Re: [PHP-DB] Error settings

2003-10-21 Thread CPT John W. Holmes
From: Dillon, John [EMAIL PROTECTED] How do I get rid of the undefined variable errors I get on a new (default) set up of Apache 1.3.28/PHP4.3.2 (without re-writing the code). It works on the internet on my host providers server but I am running this on localhost. I also get undefined offset

[PHP-DB] Re: PHP + FIREBIRD + INTERNET INFORMATION SERVER

2003-10-21 Thread Dave Dash
What does it show? It seems strange that Firebird *and* PHP somehow caused a problem, but somet higns you can try are this. Output the php file into an HTML (use another browser perhaps, or wget) and then see if you can view the idnividual HTML file. -dd Thejavo [EMAIL PROTECTED] wrote in

RE: [PHP-DB] Error settings

2003-10-21 Thread Dillon, John
From: Dillon, John [EMAIL PROTECTED] How do I get rid of the undefined variable errors I get on a new (default) set up of Apache 1.3.28/PHP4.3.2 (without re-writing the code). It works on the internet on my host providers server but I am running this on localhost. I also get undefined offset

[PHP-DB] Problems with PEAR::SOAP

2003-10-21 Thread Justin Patrin
If this is the wrong list for this request, please tell me where to send it. I've just started using the SOAP classes define a web service and have gotten a lot done, but am having some strange and peculiar errors. I started by using this tutorial:

[PHP-DB] Multiple adds?

2003-10-21 Thread Robert Sossomon
I am working on a quote system and have been trying to figure out how to make them system automatically add an entire vendor or category at one time. I can make the system display all of them and give the sales folks in my office a chance to change the price, however if I have just one Add button

Re: [PHP-DB] Multiple adds?

2003-10-21 Thread CPT John W. Holmes
From: Robert Sossomon [EMAIL PROTECTED] I am working on a quote system and have been trying to figure out how to make them system automatically add an entire vendor or category at one time. I can make the system display all of them and give the sales folks in my office a chance to change the

Re: [PHP-DB] Error settings

2003-10-21 Thread CPT John W. Holmes
From: Dillon, John [EMAIL PROTECTED] Hm. Adjusted error_reporting to none. Why would I still get: Forbidden You don't have permission to access /method=post on this server. -- -- Apache/1.3.28 Server at

RE: [PHP-DB] Multiple adds?

2003-10-21 Thread Robert Sossomon
An example is: http://www.garlandcnorris.com/quotes/seestore.php I have a session tracker installed on it already, but the modifying the information (instead of remove and readding it) and adding an entire group are pieces I am stumbling on. TIA!

[PHP-DB] trouble with utf-8 between pgsql and php

2003-10-21 Thread Agri
Hello I'm trying to modify all my php scripts to generate utf-8 output. I got trouble with getting utf-8 encoded text from pgsql. My database contains koi8-r encoded text. I tried to call pg_set_client_encoding ($db_connection, 'UNICODE'); but it didn't help, i still recieved koi8-r encoded text.

Re: [PHP-DB] Multiple adds?

2003-10-21 Thread CPT John W. Holmes
From: Robert Sossomon [EMAIL PROTECTED] An example is: http://www.garlandcnorris.com/quotes/seestore.php I have a session tracker installed on it already, but the modifying the information (instead of remove and readding it) and adding an entire group are pieces I am stumbling on. So you

[PHP-DB] Re: using href=abc.php/?day=......

2003-10-21 Thread Gabriel Peugnet
It's just the syntax: 1. Don't use the / after .php: a href=abc.php?day= 2. Don't use echo inside the string: a href='abc.php?day=$start_day'/a 3. Check the use of double and single quotes. If you use: echo a href='abc.php?day=$start_day'abc/a; maybe you will get the link you want.

RE: [PHP-DB] Multiple adds?

2003-10-21 Thread Robert Sossomon
BOTH would be wonderful. But for right now I could handle just the multiple adds. I don't figure they would be able to mess up too many that they will have to go back and modify more then 1 or 2, but right now the majority of the quotes are for an entire vendor or category, so adding the whole

RE: [PHP-DB] Re: using href=abc.php/?day=......

2003-10-21 Thread Robert Sossomon
Where are you getting the PHP variable from, another page, or ??? I use the print function in my scripts, mainly have the script write everything to one big variable and then printing the variable. By using this method I can code the pieces in the big variable and they all come out nice and

RE: [PHP-DB] Re: using href=abc.php/?day=......

2003-10-21 Thread Robert Sossomon
Sorry, I was over thinking... Just modify it by removing the echo and the / and it should code right out for you. a href=abc.php/?day=+?echo $start_day;? /a BECOMES: a href=abc.php?day=$start_day /a Robert -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] trouble with utf-8 between pgsql and php

2003-10-21 Thread Agri
hmm really... SQL_ASCII :-\ can i change charset of a database? Agri On Tue, 21 Oct 2003 14:59:06 -0400 Gerard Samuel [EMAIL PROTECTED] wrote: In what character set is your database initialised as??? Agri wrote: Hello I'm trying to modify all my php scripts to generate utf-8

Re: [PHP-DB] trouble with utf-8 between pgsql and php

2003-10-21 Thread Agri
seems to be a bug pg_set_client_encoding ($db_connection, 'UNICODE'); -- doesn't work pg_query ($dbconn, set client_encoding to 'UNICODE'); --- does work Agri PS: Gerard Samuel, thnx a lot :-) On Tue, 21 Oct 2003 23:16:18 +0400 Agri [EMAIL PROTECTED] wrote: hmm really... SQL_ASCII :-\

[PHP-DB] Urgent help needed

2003-10-21 Thread Chris Payne
Hi there everyone, I have this system where you can create folders on your HD for inserting PDF files via a web interface and you can also remove these folders, this works no problem, but I have run into a snag, I need to send more than 1 field in the below array via a form, how can I do?

Re: [PHP-DB] Urgent help needed

2003-10-21 Thread John W. Holmes
Chris Payne wrote: Basically, aswell as sending the ID, I need to send the title and path too and i'm abit confused. input type=checkbox name=del[] value=?=$id? You could pass the value as id/title/path where / is a delimiter, then pull it apart on the other side. Or, you could format 3

Re: [PHP-DB] Urgent help needed

2003-10-21 Thread Rolf Brusletto
Chris - it might take a little work, but I think I have a good solution for ya. I would maybe use the $id as the key, and then use hidden inputs to set the other stuff in a multidimensional array. like so input type=checkbox name=del[?=$id?][path] value=?=$path? input type=hidden

RE: [PHP-DB] Urgent help needed

2003-10-21 Thread Ryan Jameson (USA)
Or you could hire John or me to do it for you. :-) Just kidding. I used the delimiting solution all over the place it is pretty simple. Ryan -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 4:42 PM To: Chris Payne Cc: [EMAIL PROTECTED]

Re: [PHP-DB] Urgent help needed

2003-10-21 Thread Karen Resplendo
In the input definition onclick call a javascript function with all your parameters. Might be a missing quote here and there but this is close to ones I use all the time: echo brinput type=button value = \Go\ onClick=\yourjavascriptfunction('$parameter1','$parameter2','$parameter3')\; Now

[PHP-DB] How do I get quotes around strings to display?

2003-10-21 Thread Karen Resplendo
My ascii file coming in has quotes around each comma delimited item. After reading the rows into array these quotes are gone. Can't figure out how to put them back in the array items when displaying the fields. Rows are saved to table and bad rows are displayed in browser. Hope this fits this

Re: [PHP-DB] How do I get quotes around strings to display?

2003-10-21 Thread jeffrey_n_Dyke
$fieldarray = array(one,Two, three, four); $line = \.implode(\,\,$fieldarray) .\; this will print out one,Two,three,four hth jeff

Re: [PHP-DB] Load MySQL from a variable

2003-10-21 Thread Kim Kohen
G'day CPT John W. Holmes and Rory AFAIK, LOAD DATA INFILE will only work off a file. So you would have to create a temp file. Another option is to create a multiple value insert query e.g. Agree that LOAD DATA INFILE will probably still be faster overall, even with the file write. Try each

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