[PHP] Re: Newbie Question about Conditionals

2010-03-31 Thread Shawn McKenzie
Matty Sarro wrote: > Hey all! > This is probably my second post on the list, so please be gentle. Right now > I am running through the "Heads First PHP and MySQL" book from O'Reilly. > It's been quite enjoyable so far, but I have some questions about some of > the code they're using in one of the c

Re: [PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Jochem Maas
Man-wai Chang wrote: >> queries in the command-line MySQL client. If it works there but not >> through mysqli_query() then you might have a case for asking here. > > For the 13081 chinese alphabets I tried, only 1 one failed, and it's > 0x9f54. mysqli_query() should have escaped the string for me.

[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Man-wai Chang
> queries in the command-line MySQL client. If it works there but not > through mysqli_query() then you might have a case for asking here. For the 13081 chinese alphabets I tried, only 1 one failed, and it's 0x9f54. mysqli_query() should have escaped the string for me. So ... I suppose most PHP p

Re: [PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Stut
Man-wai Chang wrote: >>> create table temp ( big5 char(2) ) character set big5 collate big5_bin; >>> insert into temp ( big5 ) values ( 0x9f54 ); >>> insert into temp ( big5 ) values ( 0x9f53 ); >>> The 2nd query will report duplicated key. How should I fix the problem? >> What does this has to do

[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-24 Thread Man-wai Chang
>> create table temp ( big5 char(2) ) character set big5 collate big5_bin; >> insert into temp ( big5 ) values ( 0x9f54 ); >> insert into temp ( big5 ) values ( 0x9f53 ); >> The 2nd query will report duplicated key. How should I fix the problem? > What does this has to do with PHP? > First of all I

Re: [PHP] Re: Newbie question about

2006-09-11 Thread tedd
At 5:36 PM +0100 9/11/06, Stut wrote: tedd wrote: Opinions? I would have to agree. Having watched the server CPU load while playing with this test script it would appear that the performance can be skewed a lot more by that than by the method you use for squidging out the output. As a cu

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Satyam
- Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Satyam" <[EMAIL PROTECTED]> Cc: Sent: Monday, September 11, 2006 6:32 PM Subject: Re: [PHP] Re: Newbie question about Satyam wrote: I admit I'm totally surprised about the buffered res

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut
Jon Anderson wrote: Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. Just looking through the source, could you try changing the first example to put the output all on one line? It's th

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut
tedd wrote: At 4:56 PM +0100 9/11/06, Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut Which begs the question, does it make much of a difference? (not you being bored, but the

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut
Satyam wrote: I admit I'm totally surprised about the buffered results. Nevertheless, may I sugest you add the following to the series of tests?: Using line-by-line single-quoted echowith comma separated arguments There seems to be one thing rarely anybody remembers, echo admits mu

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Satyam
are the second best option. Satyam - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Jon Anderson" <[EMAIL PROTECTED]> Cc: "Satyam" <[EMAIL PROTECTED]>; Sent: Monday, September 11, 2006 5:56 PM Subject: Re: [PHP] Re: Newbie que

Re: [PHP] Re: Newbie question about

2006-09-11 Thread tedd
At 4:56 PM +0100 9/11/06, Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut Which begs the question, does it make much of a difference? (not you being bored, but the rather speed

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Stut
How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Jon Anderson
Satyam wrote: for ($x=0;$x<1000;$x++) { echo ' X is ' , $x , ''; } This seems to be a hair faster. I extended the test to 1 requests (still concurrency 10) to make the test a little more reproducible: echo str,var,str did 604.65 requests a second where ?> did 599.63 requests a second. I

Re: [PHP] Re: Newbie question about

2006-09-10 Thread Satyam
- Original Message - From: "Jon Anderson" <[EMAIL PROTECTED]> To: Cc: "Al" <[EMAIL PROTECTED]> Sent: Sunday, September 10, 2006 9:16 PM Subject: Re: [PHP] Re: Newbie question about Al wrote: Structurally, there is a far better way to compile you

Re: [PHP] Re: Newbie question about

2006-09-10 Thread Jon Anderson
Al wrote: Structurally, there is a far better way to compile your html pages. This approach is easier to design and debug and it is faster since it sends one complete packet instead of one for every short tag. And, it saves using ob_start() and ob_flush(). Consider: $report= ''; $report .=

Re: [PHP] Re: Newbie question about

2006-09-10 Thread Satyam
- Original Message - From: "Al" <[EMAIL PROTECTED]> To: Sent: Sunday, September 10, 2006 5:52 PM Subject: [PHP] Re: Newbie question about Mike Borrelli wrote: Good day, While I've been using php for more than a little while now, I've never understood w

[PHP] Re: Newbie question about

2006-09-10 Thread Al
Mike Borrelli wrote: Good day, While I've been using php for more than a little while now, I've never understood why the use of the "" short tag is noted "to be avoided". Or rather, I understand that there's an option to disable it, and that's why it's noted in this way, but I don't understand

[PHP] Re: Newbie question about operators

2004-04-08 Thread Gabe
Thanks Ligaya "Ligaya Turmelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > it is refering to the associative array, specifically the $key => $value . > Note here (http://www.php.net/manual/en/language.types.array.php). > > Respectfully, > Ligaya Turmelle > > "Gabe" <[EMAIL PROT

[PHP] Re: Newbie question about operators

2004-04-07 Thread Ligaya Turmelle
it is refering to the associative array, specifically the $key => $value . Note here (http://www.php.net/manual/en/language.types.array.php). Respectfully, Ligaya Turmelle "Gabe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Looking at the code below, what exactly is happening wit

[PHP] Re: newbie question about scope

2003-11-12 Thread pete M
things to check.. check the register_globals flag in php.ini - you can also set this using ini_set() Check the short_open_tags are either on/off - again this chan be changes in ini_set() pete News.Comcast.Giganews.Com wrote: I am an experienced web developer who is just getting into php. I h

[PHP] Re: Newbie question about SQL result formatting

2002-08-09 Thread Kristoffer Strom
There we go :) If there's any consolation, you just helped NataliePortman.com become a better website :) Thx /Kris "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > see nl2br(). You might also want to convert spaces to  's > > On Fri, 9 Aug

[PHP] Re: Newbie question about SQL result formatting

2002-08-09 Thread Philip Hallstrom
see nl2br(). You might also want to convert spaces to  's On Fri, 9 Aug 2002, Kristoffer Strom wrote: > Ok, this is totally newbie but I just started messing around with PHP after > programming IBM's NetData for a while. > > My first big problem I haven't been able to solve myself is how to for

[PHP] Re: Newbie question about PHP and Oracle

2002-05-28 Thread Markus Mirsberger
Hi, I think you mean hwo u can get the data into an array well here is an example : $query = "select ..."; $stmt = ociparse( $connectionhandle, $query ); if( ociexecute( $stmt, OCI_DEFAULT ) ){ ocifetchinto( $stmt, $row, OCI_ASSOC+OCI_RETURN_NULLS ); } and now you got 1 resultset in an

Re: [PHP] Re: Newbie: Question about filesize()

2002-02-06 Thread Lars Torben Wilson
On Wed, 2002-02-06 at 15:33, Jeff Sheltren wrote: > At 10:27 AM 2/6/2002 -0500, Ben Crawford wrote: > >You also seem to have an extra equals. Your loop should read: > > > >while (false != ($file=readdir($handle))){ > > I think you could eliminate the "false !=" in the while condition... > > It s

Re: [PHP] Re: Newbie: Question about filesize()

2002-02-06 Thread Lars Torben Wilson
On Wed, 2002-02-06 at 07:27, Ben Crawford wrote: > You also seem to have an extra equals. Your loop should read: > > while (false != ($file=readdir($handle))){ > > It should come up as an error, but I'm not sure. > > Ben No, that's the 'identical' operator, which returns true when its operands

Re: [PHP] Re: Newbie: Question about filesize()

2002-02-06 Thread Jeff Sheltren
At 10:27 AM 2/6/2002 -0500, Ben Crawford wrote: >You also seem to have an extra equals. Your loop should read: > >while (false != ($file=readdir($handle))){ I think you could eliminate the "false !=" in the while condition... It should be just the same if you write while (($file = readdir($handl

RE: [PHP] Re: Newbie: Question about filesize()

2002-02-06 Thread Martin Towell
L PROTECTED] Subject: [PHP] Re: Newbie: Question about filesize() You also seem to have an extra equals. Your loop should read: while (false != ($file=readdir($handle))){ It should come up as an error, but I'm not sure. Ben Manuel Ritsch wrote: > Hello There > > I'm n

[PHP] Re: Newbie: Question about filesize()

2002-02-06 Thread Ben Crawford
You also seem to have an extra equals. Your loop should read: while (false != ($file=readdir($handle))){ It should come up as an error, but I'm not sure. Ben Manuel Ritsch wrote: > Hello There > > I'm new to PHP and trying to code a function that reads all teh files out of > a directory and p

[PHP] Re: Newbie: Question about filesize()

2002-01-31 Thread Jim Winstead
Manuel Ritsch <[EMAIL PROTECTED]> wrote: > $file_s = filesize($file); you want $file_s = filesize("images/$file"). jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To c