Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-12 Thread Alain Roger
and why not : $out = iconv('windows-1250','UTF-8', $in); ??? Alain On 8/12/07, brian [EMAIL PROTECTED] wrote: Alain Roger wrote: Hi, I import a csv file (which includes characters from windows-1250 charset) to postgreSQL database which is in UTF-8. How can i convert windows-1250 to

[PHP] PostgreSQL and select nextval

2007-08-12 Thread Alain Roger
Hi, I'm getting an error message when i run the following SQL request : $sql = INSERT INTO tmp_importedxls (rec_id, publisher) VALUES (SELECT nextval('tmp_importedxls_rec_id_seq'),'$pb'); Error in SQL query: ERROR: syntax error at or near SELECT LINE 2: VALUES (SELECT

[PHP] What's is the needed configuration to enable SOAP?

2007-08-12 Thread Brice
Hello all, I have a little problem with Soap. I programmed a script which works well on all server except one. I had an 'HTTP Error : Couldn't open socket connection to server' Too bad for me it's the main one. I wonder if there is a configuration problem? I just saw that socket is disabled on

Re: [PHP] manual vs. meta refresh

2007-08-12 Thread Tijnema
On 8/12/07, Robert Cummings [EMAIL PROTECTED] wrote: On Sat, 2007-08-11 at 22:11 -0500, Richard Lynch wrote: You don't do it there. You do whatever it is you have to do in the URL before you re-direct. Though I guess if you want different output on that page, you would need to set

Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-12 Thread Tijnema
On 8/12/07, Alain Roger [EMAIL PROTECTED] wrote: and why not : $out = iconv('windows-1250','UTF-8', $in); ??? Alain Did you test if that works? I doubt it, as windows-1250 isn't listed on the homepage of libiconv: http://www.gnu.org/software/libiconv/ Tijnema On 8/12/07, brian [EMAIL

Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-12 Thread Alain Roger
I've tested it and it works well. i got some issue when i used ISO-8859-2. Al On 8/12/07, Tijnema [EMAIL PROTECTED] wrote: On 8/12/07, Alain Roger [EMAIL PROTECTED] wrote: and why not : $out = iconv('windows-1250','UTF-8', $in); ??? Alain Did you test if that works? I doubt it, as

[PHP] very strange behavior.... incomplete query performed

2007-08-12 Thread Alain Roger
Hi, I'm still working on importing CSV file content (20.000 records) to database PostgreSQL. when i run the query, once i stored into my table 5218 records, another time 5231 another time 4713 and so on every time the amount of records imported to DB is different. Do you have any idea from

Re: [PHP] very strange behavior.... incomplete query performed

2007-08-12 Thread Tijnema
On 8/12/07, Alain Roger [EMAIL PROTECTED] wrote: Hi, I'm still working on importing CSV file content (20.000 records) to database PostgreSQL. when i run the query, once i stored into my table 5218 records, another time 5231 another time 4713 and so on every time the amount of records

Re: [PHP] question about note on php.net

2007-08-12 Thread Stut
brian wrote: Michael Cooper wrote: Hello, I have a question--is the note from equazcion here correct? It is left unchallenged on the page but I can't see how it is correct since I am under the impression that the environment is refreshed each page load and the function or method definitions

Re: [PHP] What's is the needed configuration to enable SOAP?

2007-08-12 Thread Stut
Brice wrote: I have a little problem with Soap. I programmed a script which works well on all server except one. I had an 'HTTP Error : Couldn't open socket connection to server' Too bad for me it's the main one. I wonder if there is a configuration problem? I just saw that socket is disabled

Re: [PHP] very strange behavior.... incomplete query performed

2007-08-12 Thread Stut
Tijnema wrote: On 8/12/07, Alain Roger [EMAIL PROTECTED] wrote: Hi, I'm still working on importing CSV file content (20.000 records) to database PostgreSQL. when i run the query, once i stored into my table 5218 records, another time 5231 another time 4713 and so on every time the amount

Re: [PHP] What's is the needed configuration to enable SOAP?

2007-08-12 Thread Tijnema
On 8/12/07, Brice [EMAIL PROTECTED] wrote: Hello all, I have a little problem with Soap. I programmed a script which works well on all server except one. I had an 'HTTP Error : Couldn't open socket connection to server' Too bad for me it's the main one. I wonder if there is a configuration

Re: [PHP] javascript in head or in body ?

2007-08-12 Thread David Robley
tedd wrote: At 9:29 PM +0200 8/7/07, Tijnema wrote: On 8/7/07, Robert Cummings [EMAIL PROTECTED] wrote: Yeah!! This list is for public apologies and Copyright discussion. Cheers, Rob. -- Oh yeah, Tedd is only the first of thousands of people that need to apologize... :P Tijnema

Re: [PHP] PostgreSQL and select nextval

2007-08-12 Thread brian
Alain Roger wrote: Hi, I'm getting an error message when i run the following SQL request : $sql = INSERT INTO tmp_importedxls (rec_id, publisher) VALUES (SELECT nextval('tmp_importedxls_rec_id_seq'),'$pb'); Error in SQL query: ERROR: syntax error at or near SELECT LINE 2: VALUES (SELECT

Re: [PHP] manual vs. meta refresh

2007-08-12 Thread Robert Cummings
On Sun, 2007-08-12 at 13:47 +0200, Tijnema wrote: On 8/12/07, Robert Cummings [EMAIL PROTECTED] wrote: On Sat, 2007-08-11 at 22:11 -0500, Richard Lynch wrote: You don't do it there. You do whatever it is you have to do in the URL before you re-direct. Though I guess if you want

Re: [PHP] magic quotes

2007-08-12 Thread Nisse Engström
On Thu, 9 Aug 2007 00:29:15 -0500 (CDT), Richard Lynch wrote: Problem #7: Magic Quotes was designed for the ASCII character set, and is downright dangerous to use for anything else (Unicode/UTF-8/etc). ... [Though maybe not, as maybe addslashes can't do any harm to Unicode if there's no '

Re: [PHP] Friday morning brain farts....

2007-08-12 Thread tedd
At 4:54 PM +0200 8/11/07, Tijnema wrote: On 8/11/07, tedd [EMAIL PROTECTED] wrote: At 7:21 PM +0200 8/10/07, Tijnema wrote: On 8/10/07, Robert Cummings [EMAIL PROTECTED] wrote: if( !isset( $argv[1] ) || !isset( $argv[2] ) || !isset( $argv[3] ) )

Re: [PHP] javascript in head or in body ?

2007-08-12 Thread tedd
At 1:26 PM -0400 8/11/07, Robert Cummings wrote: On Sat, 2007-08-11 at 12:15 -0400, tedd wrote: Always (fishing for another apology opportunity) place javascript in external files and call them in via the header. Keep the code unobtrusive. There are ways to use javascript without having to

[PHP] OT Re: [PHP] javascript in head or in body ?

2007-08-12 Thread tedd
At 10:21 PM +0930 8/12/07, David Robley wrote: tedd wrote: At this rate, by the time I reach the end of my life, I'll know only two sentences, namely I'm sorry and Yes, Dear. Seems to me you could rather easily condense that to just one sentence with the same degree of functionality. :-)

[PHP] PHP Books - A poll of sorts

2007-08-12 Thread Jay Blanchard
Evening all! (at least it is evening here in Texas) We all have our favorite PHP books and resources but there is one tome that seems to be missing from the group...a best practices book. We all have our preferences for what we call best practices and it seems at this stage in the life of PHP

Re: [PHP] Concatenation vs. Interpolation

2007-08-12 Thread Danial Rahmanzadeh
In my opinion, concatenation reduces code readability because unlike java(that uses + operator), php uses dot(.) for concatenation consider the following codes: //java String mystr=hello+world; is more readable from: //php $mystr=hello.world; if you only need echoing something to output(which is

Re: [PHP] javascript in head or in body ?

2007-08-12 Thread Robert Cummings
On Sun, 2007-08-12 at 21:27 -0400, tedd wrote: At 1:26 PM -0400 8/11/07, Robert Cummings wrote: On Sat, 2007-08-11 at 12:15 -0400, tedd wrote: Always (fishing for another apology opportunity) place javascript in external files and call them in via the header. Keep the code unobtrusive.

Re: [PHP] PHP Books - A poll of sorts

2007-08-12 Thread Robert Cummings
On Sun, 2007-08-12 at 20:52 -0500, Jay Blanchard wrote: Evening all! (at least it is evening here in Texas) We all have our favorite PHP books and resources but there is one tome that seems to be missing from the group...a best practices book. We all have our preferences for what we call

Re: [PHP] PHP Books - A poll of sorts

2007-08-12 Thread Larry Garfield
The vast majority of my work these days is done using the Drupal CMS, which has its own coding standards and best practices and conventions that are (IMO) pretty darned good. I've adopted most of it in my non-Drupal work, too, for simplicity. So um, maybe, but I probably wouldn't jump at it

Re: [PHP] PHP Books - A poll of sorts

2007-08-12 Thread Janet Valade
Jay Blanchard wrote: Evening all! (at least it is evening here in Texas) We all have our favorite PHP books and resources but there is one tome that seems to be missing from the group...a best practices book. We all have our preferences for what we call best practices and it seems at this

[PHP] Strip numerical indices from array

2007-08-12 Thread Dave M G
PHP General list, I've got an associative array that also includes a numerical index. The numerical index was automatically generated from the mysql_fetch_array command, so it the values are the duplicates of the associative key names. Is there a way to simply strip off the numerical index,

[PHP] phpinfo problem

2007-08-12 Thread Rick Knight
I have just installed PHP-5.2.3 on my Kubuntu Feisty box. I removed all the debian php first and then compiled php with the options I needed. Now everything seems to be working except phpinfo.php which consists of one line. ? phpinfo(); ? I get a blank screen. If I delete the php.ini file

Re: [PHP] phpinfo problem

2007-08-12 Thread Chris
You probably just have short_open_tags set to Off in your php.ini file. If so, either turn it On, or change the file to be: ?php phpinfo(); ? Chris Rick Knight wrote: I have just installed PHP-5.2.3 on my Kubuntu Feisty box. I removed all the debian php first and then compiled php with the

Re: [PHP] Strip numerical indices from array

2007-08-12 Thread Larry Garfield
There is, but you want to be using mysql_fetch_assoc() instead which gives you just the keyed indexes in the first place. Or, better yet, use mysqli_ or PDO which offer better security than mysql_ if you're running PHP 5 (which you are, right? g) On Sunday 12 August 2007, Dave M G wrote: PHP

Re: [PHP] PHP Books - A poll of sorts

2007-08-12 Thread Paul Scott
On Sun, 2007-08-12 at 20:52 -0500, Jay Blanchard wrote: If there was a best practices book would you buy it? (I am showing complete disregard for the thread on copyright infringement v. theft.) Or do you rely on other sources like this list, articles, etc to derive your own set of practices?