Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Ross McKay
Robert Cummings wrote: >That's because JavaScript is broken in some ways. As much as I like >JavaScript, some parts of the language were thrown together by flinging >crap at a fan and seeing what sticks to the wall... this being a prime >example. Sounds a lot like PHP :) which I must add I lov

Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Robert Cummings
On 11-09-01 01:44 AM, Ross McKay wrote: On Tue, 30 Aug 2011 10:04:54 -0400, Tedd Sperling wrote: I prefer the Whitesmiths style: http://rebel.lcc.edu/sperlt/citw229/brace-styles.php But "style" is really up to the individual -- what works best for you is the "best" (unless it's a team effort

Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread George Langley
On 2011-08-31, at 11:44 PM, Ross McKay wrote: > On Tue, 30 Aug 2011 10:04:54 -0400, Tedd Sperling wrote: > >> I prefer the Whitesmiths style: >> >> http://rebel.lcc.edu/sperlt/citw229/brace-styles.php >> >> But "style" is really up to the individual -- what works best for you >> is the "best"

Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Robert Cummings
On 11-08-31 08:20 PM, Tedd Sperling wrote: On Aug 30, 2011, at 3:09 PM, Robert Cummings wrote: On 11-08-30 11:36 AM, Richard Quadling wrote: On 30 August 2011 15:04, Tedd Sperling wrote: To all: I prefer the Whitesmiths style: http://rebel.lcc.edu/sperlt/citw229/brace-styles.php But "sty

Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Ross McKay
On Tue, 30 Aug 2011 10:04:54 -0400, Tedd Sperling wrote: >I prefer the Whitesmiths style: > >http://rebel.lcc.edu/sperlt/citw229/brace-styles.php > >But "style" is really up to the individual -- what works best for you >is the "best" (unless it's a team effort or the clients demand). I note on y

Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Paul M Foster
On Wed, Aug 31, 2011 at 08:20:14PM -0400, Tedd Sperling wrote: > On Aug 30, 2011, at 3:09 PM, Robert Cummings wrote: > > > On 11-08-30 11:36 AM, Richard Quadling wrote: > >> On 30 August 2011 15:04, Tedd Sperling > >> wrote: > >>> To all: > >>> > >>> I prefer the Whitesmiths style: > >>> > >>>

Re: [PHP] Re: [EasyPHP] How to export and import `alias` from previous version of EasyPHP?

2011-08-31 Thread Nam Gi VU
Dear Danial, I saw some update on EasyPHP via this group so I just thought to receive support as well as such advertisement. I'm sorry to "spam" this group. Regards. On Mon, Aug 29, 2011 at 7:26 PM, Daniel Brown wrote: > On Sun, Aug 28, 2011 at 07:10, EasyPHP wrote: > > Hi > > > > Open your o

Re: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Tedd Sperling
On Aug 30, 2011, at 3:09 PM, Robert Cummings wrote: > On 11-08-30 11:36 AM, Richard Quadling wrote: >> On 30 August 2011 15:04, Tedd Sperling wrote: >>> To all: >>> >>> I prefer the Whitesmiths style: >>> >>> http://rebel.lcc.edu/sperlt/citw229/brace-styles.php >>> >>> But "style" is really up

[PHP] Mysqli error handling

2011-08-31 Thread Robert Williams
Okay, so I've finally got an opportunity to start converting our code to use Mysqli instead of the old mysql_* functions. Mysqli is new to me, but I thought things were going well until the first time I tried to run a query with a syntax error in it, and it threw up a PHP warning. Being that Mysqli

[PHP] Re: Bug #51739 tricky string to float conversion

2011-08-31 Thread Shawn McKenzie
On 08/31/2011 01:48 PM, Shawn McKenzie wrote: > > The cast to float is truncating the invalid characters and since your > string contains a float that is INF (8315e839) before the truncation at > the "d", then it returns INF. Makes perfect sense. > Just FYI... Don't post your troubles or misun

Re: [PHP] scroll down list -visible, but not possible to choose

2011-08-31 Thread Geoff Shang
On Wed, 31 Aug 2011, rob...@myself.com wrote: I have the below function with array for satus of issues where I need to have 'Resolved/Closed' visible but not available for choice This as closing is a separate function to ensure correct resolution code is selected Already tried removing 'Resol

[PHP] Re: Bug #51739 tricky string to float conversion

2011-08-31 Thread Shawn McKenzie
On 08/31/2011 09:03 AM, magic-...@damage.devloop.de wrote: > Hi, > I have opend Bug #51739 in 2010. It was closed as bogus before my last > question was answered. It would be fine to know what you think about > that bug. > In short: > var_dump((float)"8315e839da08e2a7afe6dd12ec58245d"); > results i

Re: [PHP] scroll down list -visible, but not possible to choose

2011-08-31 Thread Ken Kixmoeller
You want: >  if($status == $selected) echo "selected = ' selected' "; (I didn't bother with \s) And BTW, unless the support person is actually sitting on top of the customer (and I can see situations where that would help), you want it to say "Waiting *for* Customer" Ken On Wed, Aug 31, 2011 at

RE: [PHP] Re: mysqli sql question

2011-08-31 Thread Jen Rasmussen
Peet, Here is the PHP PDO link: http://php.net/manual/en/book.pdo.php If you look on example #2 on this page: http://www.php.net/manual/en/pdostatement.execute.php That is pretty much how it's setup (although the example I gave is update, this is select). And please correct me I said the provide

Re: Re: [PHP] Re: mysqli sql question

2011-08-31 Thread james
> Original Message >From: Louis Huppenbauer >To: php-general@lists.php.net >Sent: Wed, Aug 31, 2011, 10:24 AM >Subject: Re: [PHP] Re: mysqli sql question > >Hi there Richard > >It's part of the prepared statements >http://php.net/manual/de/pdo.prepared-statements.php >;) > >2011/8/31 Rich

Re: [PHP] Re: mysqli sql question

2011-08-31 Thread Louis Huppenbauer
Hi there Richard It's part of the prepared statements http://php.net/manual/de/pdo.prepared-statements.php ;) 2011/8/31 Richard Riley > "Jen Rasmussen" writes: > > > Peet, > > > > Could you do something like this instead? This is using named > placeholders > > and a separate line for your stat

[PHP] Re: mysqli sql question

2011-08-31 Thread Richard Riley
"Jen Rasmussen" writes: > Peet, > > Could you do something like this instead? This is using named placeholders > and a separate line for your statement > but I was able to get it to echo the statement in this manner. > > $sql = "UPDATE table SET field1=:field1, field2=:field2 WHERE id=:id"; >

[PHP] Bug #51739 tricky string to float conversion

2011-08-31 Thread magic-php
Hi, I have opend Bug #51739 in 2010. It was closed as bogus before my last question was answered. It would be fine to know what you think about that bug. In short: var_dump((float)"8315e839da08e2a7afe6dd12ec58245d"); results in float(INF) This is because "8315" is treated as base and "e8

RE: [PHP] Hide php action pages from google

2011-08-31 Thread Jen Rasmussen
Merlin, Do you have a robots.txt file in your root folder? A text document named robots.txt in your document root containing the following text should solve your problem. # robots.txt for http://www.yourdomain.com/ User-agent: * Disallow: /subapp_search/search.php User-Agent: Googlebot Disall

RE: [PHP] mysqli sql question

2011-08-31 Thread Jen Rasmussen
Peet, Could you do something like this instead? This is using named placeholders and a separate line for your statement but I was able to get it to echo the statement in this manner. $sql = "UPDATE table SET field1=:field1, field2=:field2 WHERE id=:id"; $sth = $dbh->prepare($sql)

RE: [PHP] Code should be selv-maintaining!

2011-08-31 Thread Jen Rasmussen
Genius! -Original Message- From: Matt Graham [mailto:danceswithcr...@usa.net] Sent: Tuesday, August 30, 2011 5:59 PM To: php-general@lists.php.net Subject: Re: [PHP] Code should be selv-maintaining! From: David Harkness > I don't always use braces, but when I do I use Compact Control

Re: [PHP] mysqli sql question

2011-08-31 Thread Peet Grobler
On 8/31/2011 1:38 PM, John Black wrote: > Hi Peet, > > not sure if there is a method to echo the sql but you can set your > development MySQL server to log all queries to a log file. > Use the log file with tail and you'll get a live view of all queries the > server attempts to process. > I alre

[PHP] Hide php action pages from google

2011-08-31 Thread Merlin Morgenstern
Hi there, I do have a search form on my site which posts search queries to follogin URL: /subapp_search/search.php Depending on the search parameters it will then redirect to the appropriate URL. e.g.: /suche/labrador I now discovered in google webmastertools that this very page (search.p

Re: [PHP] utf8_decode() not working, conflicts with urlencode()

2011-08-31 Thread Merlin Morgenstern
Am 30.08.2011 12:11, schrieb Per Jessen: Merlin Morgenstern wrote: Hi there, I am having some trouble with utf8_decode(). Somehow the function returns output=input e.g.: $input = '%20%C3%9Cbersetzung%20franz'; $output = utf8_decode($input); echo $input.''.$output; My goal is to decode the ut

Re: [PHP] mysqli sql question

2011-08-31 Thread James Yerge
On 08/31/2011 05:23 AM, Peet Grobler wrote: > Is it possible to get the actual sql that is being used to query or > update the database? > > E.g > $sth = $dbh->prepare ("update table set field=?, field2=? where id=?); > mysqli_bind_param ($sth, 'ssi', 'text1', 'text2', 10); > $sth->execute(); > > S

Re: [PHP] mysqli sql question

2011-08-31 Thread John Black
On 31.08.2011 11:23, Peet Grobler wrote: Is it possible to get the actual sql that is being used to query or update the database?> E.g $sth = $dbh->prepare ("update table set field=?, field2=? where id=?); mysqli_bind_param ($sth, 'ssi', 'text1', 'text2', 10); $sth->execute(); Something like $st

RE: [PHP] scroll down list -visible, but not possible to choose

2011-08-31 Thread Lord_Farin .
> Date: Wed, 31 Aug 2011 04:30:56 -0400 > From: rob...@myself.com > To: php-general@lists.php.net > Subject: [PHP] scroll down list -visible, but not possible to choose > > Hi, > Got so excellent and fast help last time so trying again here > > I have the below function with array for satus of

[PHP] mysqli sql question

2011-08-31 Thread Peet Grobler
Is it possible to get the actual sql that is being used to query or update the database? E.g $sth = $dbh->prepare ("update table set field=?, field2=? where id=?); mysqli_bind_param ($sth, 'ssi', 'text1', 'text2', 10); $sth->execute(); Something like $sth->sql? Or $dbh->sql? I want to see "updat

[PHP] scroll down list -visible, but not possible to choose

2011-08-31 Thread robert
Hi, Got so excellent and fast help last time so trying again here I have the below function with array for satus of issues where I need to have 'Resolved/Closed' visible but not available for choice This as closing is a separate function to ensure correct resolution code is selected Already