Re: [PHP] framework or not

2013-10-26 Thread Robert Cummings
On 13-10-24 09:41 PM, Larry Garfield wrote: On 10/23/2013 08:51 AM, Jay Blanchard wrote: [snip] a bitter rant[/snip] Dang Larry - bad night? That wasn't a bitter rant. You haven't seen me bitter. :-) That was "tough love" to the OP. I don't see a reason to pussyfoot around the orig

Re: [PHP] framework or not

2013-10-22 Thread Robert Cummings
On 13-10-22 05:38 PM, Larry Garfield wrote: If you need more convincing, I will cite Fred Brooks: http://www.cs.nott.ac.uk/~cah/G51ISS/Documents/NoSilverBullet.html Excellent article, thanks for the pointer. So many assertions have stood the test of time thus far. Cheers, Rob. -- E-Mail Dis

Re: [PHP] Apache

2013-09-25 Thread Robert Stone
Period. > >Have nice days, >Niklaus > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php Thanks, Ash -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Sorry for this late post but I'm amazed nobody consulted the doco. The php.net site has a whole section titled "Handling File Uploads". Also check out finfo_open and finfo_file. If your are a windoze user you need a dll. If you want Apache to handle PUT requests you MUST tell it to run a script as it cannot write to web root. HTH Robert

Re: [PHP] Static utility class?

2013-09-05 Thread Robert Cummings
On 13-09-05 02:27 PM, Micky Hulse wrote: On Wed, Sep 4, 2013 at 11:07 PM, Robert Cummings wrote: I'll second Rodrigo's opinion, but would like to comment that the name of the class is misleading since it's called "Singleton". The singleton pattern is used wh

Re: [PHP] Static utility class?

2013-09-04 Thread Robert Cummings
On 13-09-04 09:06 PM, Micky Hulse wrote: Hi Rodrigo, thanks for the help, I really appreciate it! On Wed, Sep 4, 2013 at 5:55 PM, Rodrigo Santos wrote: Hi, first, sorry for the bad English. Not bad at all! Very clear and well written reply (heck, it's better than my native English writing),

Re: [PHP] exec and system do not work

2013-08-25 Thread Robert Cummings
On 13-08-25 11:41 PM, Ethan Rosenberg wrote: Dear List - I'm lost on this one - This works - $out = system("ls -l ",$retvals); printf("%s", $out); This does - echo exec("ls -l"); This does not - if( !file_exists("/var/www/orders.txt")); { $out = system("touch /var/www/orders.txt", $re

Re: [PHP] How can I submit more than 2000 items of data?

2013-08-19 Thread Robert Cummings
On 13-08-19 11:32 AM, Stuart Dallas wrote: On 19 Aug 2013, at 16:24, Matijn Woudt wrote: You might want to explain how you convert form data to JSON without javascript? PHP can do it. Ruby can do it. .NET can do it. Just because you want to use JSON in a web browser where Javascript is the

Re: [PHP] Finally....

2013-08-16 Thread Robert Cummings
On 13-08-16 11:58 AM, Marc Guay wrote: Those Belgacom emails were the only thing keeping me from a crushing loneliness - undo! *sniffle* Another friend bites the dust *sniffle*. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential a

Re: [PHP] POST action

2013-08-01 Thread Robert Cummings
On 13-08-01 05:14 PM, Paul M Foster wrote: On Thu, Aug 01, 2013 at 02:35:04PM -0500, Larry Garfield wrote: [snip] So you're writing your own form tags for each specific time you need a form, or you wrote your own form builder API that is writing the form tags for you? Unless my wife creates

Re: [PHP] POST action

2013-07-28 Thread Robert Cummings
On 13-07-28 01:51 PM, Jim Giner wrote: On 7/28/2013 1:38 PM, Ashley Sheridan wrote: On Sun, 2013-07-28 at 13:37 -0400, Jim Giner wrote: On 7/28/2013 1:26 PM, Larry Garfield wrote: On 07/28/2013 12:14 PM, iccsi wrote: Your name: Your age: In the PHP tutorial manual, it says that we can ha

Re: [PHP] POST action

2013-07-28 Thread Robert Cummings
On 13-07-28 01:14 PM, iccsi wrote: Your name: Your age: In the PHP tutorial manual, it says that we can have post action to the form itself just like above coding.I would like to know in the real projects, can we have action to the same PHP file, since that we only need have one filebut

Re: [PHP] From 24/7/2013 to 2013-07-24

2013-07-26 Thread Robert Cummings
On 13-07-26 05:33 PM, Jim Giner wrote: On 7/26/2013 5:29 PM, Robert Cummings wrote: And so it follows, that my solution, thus far, is the only solution posted that actually meets the requirements. Why you think my solution does not perform is beyond me since a simple run of the code would

Re: [PHP] From 24/7/2013 to 2013-07-24

2013-07-26 Thread Robert Cummings
On 13-07-26 04:38 PM, jomali wrote: On Fri, Jul 26, 2013 at 1:08 PM, Robert Cummings wrote: On 13-07-26 11:42 AM, jomali wrote: On Fri, Jul 26, 2013 at 5:18 AM, Karl-Arne Gjersøyen wrote: Below is something I try that ofcourse not work because of rsosort. Here is my code

Re: [PHP] From 24/7/2013 to 2013-07-24

2013-07-26 Thread Robert Cummings
On 13-07-26 11:42 AM, jomali wrote: On Fri, Jul 26, 2013 at 5:18 AM, Karl-Arne Gjersøyen wrote: Below is something I try that ofcourse not work because of rsosort. Here is my code: --- $lagret_dato = $_POST['lagret_dato']; foreach($lagret_dato as $dag){ $dag =

Re: [PHP] error_handler : unique "caller ID" ?

2012-11-13 Thread Robert Williams
ctly what you need, but it only works with objects. AFAIK, there's no equivalent for scalars or arrays. <http://php.net/manual/en/function.spl-object-hash.php> Regards, Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Businesss Services, Inc.

Re: [PHP] Creating an Advanced Form

2012-11-02 Thread Robert Stone
Hi Jonathan, Haven't used MySql for ages. More used to Oracle and PostgreSql. Your table nmc_cd contains foreign keys pointing to nmc_category and nmc_publisher. Create a view containing all the data from those three tables using implicit joins as the data in table nmc_cd should NOT contain any

[PHP] Free LAPP stack

2012-10-21 Thread Robert Stone
sting. Any suggestions welcome. TIA, Robert

Re: [PHP] Re: PHP as Application Server

2012-09-26 Thread Robert Williams
ere it makes sense. Where neither is a perfect fit, you can choose the one that creates the least personal pain. It's a wonderful choice to have. Regards, Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Businesss Services, Inc. -- The Small Business Author

Re: [PHP] Re: Programmers and developers needed

2012-09-19 Thread Robert Cummings
On 12-09-19 06:07 AM, Matijn Woudt wrote: On Wed, Sep 19, 2012 at 11:53 AM, German Geek wrote: See below. On 19 September 2012 04:45, Matijn Woudt wrote: On Tue, Sep 18, 2012 at 8:52 AM, agbo onyador wrote: The growing power of the internet and global networks. (on the world’s politics, e

Re: [PHP] Re: Programmers and developers needed

2012-09-18 Thread Robert Cummings
On 12-09-18 02:38 PM, Jeff Burcher wrote: -Original Message- From: Robert Cummings [mailto:rob...@interjinn.com] Sent: Tuesday, September 18, 2012 2:22 PM To: Matijn Woudt Cc: Daevid Vincent; PHP-General Subject: Re: [PHP] Re: Programmers and developers needed On 12-09-18 02:12 PM

Re: [PHP] Re: Programmers and developers needed

2012-09-18 Thread Robert Cummings
On 12-09-18 02:12 PM, Matijn Woudt wrote: On Tue, Sep 18, 2012 at 8:02 PM, Daevid Vincent wrote: -Original Message- From: Matijn Woudt [mailto:tijn...@gmail.com] You're missing the most important aspect of social networks.. Advertising. Please tell me that is said sarcastically. Adve

Re: [PHP] Programmers and developers needed

2012-09-14 Thread Robert Cummings
On 12-09-13 06:10 PM, Ashley Sheridan wrote: On Thu, 2012-09-13 at 16:48 -0400, Tedd Sperling wrote: On Sep 13, 2012, at 3:45 AM, agbo onyador wrote: Hello there! We are looking for programmers and developers to create a world wide system. Your comments are welcome. Wow! I'm looking for w

Re: [PHP] Programmers and developers needed

2012-09-13 Thread Robert Cummings
On 12-09-13 08:44 AM, Matijn Woudt wrote: On Thu, Sep 13, 2012 at 2:12 PM, Steven Staples wrote: From: Tim Dunphy [mailto:bluethu...@gmail.com] Sent: September 13, 2012 7:26 AM We are looking for programmers and developers to create a world wide system. Is it bigger than a bread box? Will

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-08-20 Thread Robert Cummings
On 12-08-21 01:11 AM, Robert Cummings wrote: On 12-08-21 12:32 AM, John Taylor-Johnston wrote: This is usually a first-year CS programming problem (word frequency counts) complicated a little bit by needing to extract the text. You've started off fine, stripping tags, converting to

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-08-20 Thread Robert Cummings
On 12-08-21 12:32 AM, John Taylor-Johnston wrote: This is usually a first-year CS programming problem (word frequency counts) complicated a little bit by needing to extract the text. You've started off fine, stripping tags, converting to lower case, you'll want to either convert or strip HTML

Re: [PHP] APC expunge notices

2012-08-17 Thread Robert Cummings
On 12-08-17 05:22 PM, Nathan Nobbe wrote: Hi everyone, I'd like to see what other folks think about the idea of having APC provide a E_WARNING or E_NOTICE when it has to expunge the cache. Ideally, this would include the amount of memory allocated in the error message. The idea here is to prov

Re: [PHP] Need to have form protection techniques

2012-08-17 Thread Robert Cummings
On 12-08-17 10:59 AM, Al wrote: On 8/17/2012 10:42 AM, Robert Cummings wrote: On 12-08-17 10:15 AM, Tedd Sperling wrote: On Aug 17, 2012, at 10:09 AM, Daniel Brown wrote: On Fri, Aug 17, 2012 at 12:05 AM, Ansry User 01 wrote: I need to know the forms validity techniques for Php

Re: [PHP] Need to have form protection techniques

2012-08-17 Thread Robert Cummings
On 12-08-17 11:14 AM, Tedd Sperling wrote: On Aug 17, 2012, at 10:42 AM, Robert Cummings wrote: On Fri, Aug 17, 2012 at 12:05 AM, Ansry User 01 wrote: I need to know the forms validity techniques for Php. This will probably take a while to absorb, so you may need to revisit this page

Re: [PHP] Need to have form protection techniques

2012-08-17 Thread Robert Cummings
On 12-08-17 10:15 AM, Tedd Sperling wrote: On Aug 17, 2012, at 10:09 AM, Daniel Brown wrote: On Fri, Aug 17, 2012 at 12:05 AM, Ansry User 01 wrote: I need to know the forms validity techniques for Php. This will probably take a while to absorb, so you may need to revisit this page seve

Re: [PHP] PHP session variables

2012-08-15 Thread Robert Cummings
On 12-08-15 03:19 PM, Tedd Sperling wrote: Rob: Again thanks. Sorry, I totally missed your point. In my "defense" I commonly use the value returned from microtime() as a string and not as a float. The code that followed my "microtime( false );" demo broke the string and recombined it into a

Re: [PHP] Reading class variable value always returns NULL

2012-08-14 Thread Robert Williams
//shows null instead of 1 var_dump($this->foo); } protected $foo; } Is that right? Regards, Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Businesss Services, Inc. -- The Small Business Authority https://www.newtekreferrals.com/r

Re: [PHP] PHP session variables

2012-08-14 Thread Robert Cummings
On 12-08-14 10:41 AM, Tedd Sperling wrote: On Aug 13, 2012, at 10:59 AM, Robert Cummings wrote: On 12-08-10 04:42 PM, Tedd Sperling wrote: On Aug 10, 2012, at 1:21 PM, Ege Sertçetin wrote: Hi. My question will maybe out of topic, I'm sorry. How can you know that one way will be

Re: [PHP] Reading class variable value always returns NULL

2012-08-13 Thread Robert Cummings
On 12-08-12 08:32 AM, Reto Kaiser wrote: Hi, So I have this strange situation where I assign a classvariable a value, but when I read the value it is NULL. The class has one variable declared: = class A { private $_cookies; } = That is a private instance variable NOT

Re: [PHP] PHP session variables

2012-08-13 Thread Robert Cummings
On 12-08-10 04:42 PM, Tedd Sperling wrote: On Aug 10, 2012, at 1:21 PM, Ege Sertçetin wrote: Hi. My question will maybe out of topic, I'm sorry. How can you know that one way will be much slower than other one? I mean, how can I learn which function is faster before I test it? Ege: No your

Re: [PHP] Repeated New Object Requests

2012-08-13 Thread Robert Cummings
On 12-08-10 02:24 PM, Al wrote: Off the subject a bit. What does PHP do with repeated new classes, e.g. $mime = new Mail_mime Are they simply ignored or are additional new instances created. PHP won't let you duplicate function names. Hi Al, New isn't defining a class, it's a request for an

Re: [PHP] Too many open files

2012-08-10 Thread Robert Cummings
On 12-08-10 02:49 AM, Matijn Woudt wrote: On Fri, Aug 10, 2012 at 5:36 AM, Jim Lucas wrote: On 8/9/2012 5:01 PM, Al wrote: Getting "Too many open files" error when processing an email batch process. I've looked extensively and can't find more than about 100 files that could be open. All my

Re: [PHP] Too many open files

2012-08-10 Thread Robert Cummings
On 12-08-09 08:01 PM, Al wrote: Getting "Too many open files" error when processing an email batch process. The batch size is actually rather small and the email text is small likewise. I've looked extensively and can't find more than about 100 files that could be open. All my fetching is with

Re: [PHP] XML/PHP web service

2012-08-08 Thread Robert Cummings
Given our history, it's stunning we fail to question those who would force upon us a total reliance on the state for defense." -- Robert J. Cottrol On Wed, Aug 8, 2012 at 4:27 PM, Ashley Sheridan wrote: Phillip Baker wrote: Greetings all, I am looking for some options here.

Re: [PHP] Awkward time processing

2012-08-02 Thread Robert Williams
0 [11] => 11 [12] => 0 [13] => 0 [14] => 0 [15] => 33 [16] => 27 [17] => 14 [18] => 0 [19] => 0 [20] => 0 [21] => 0 [22] => 0 [23] => 0 ) Process finished with exit code 0 -- Robert E. Williams, Jr. Associate Vi

Re: [PHP] What do you call the end-user?

2012-07-20 Thread Robert Williams
On Jul 20, 2012, at 0:59, "Adam Nicholls" wrote: > Personally if I'm feeling a bit cheeky I'll go with "Muggle" - (thanks to J K > Rowling!) - people just don't appreciate the magic involved behind the scenes > in usability, infrastructure, application logic etc. Wow. I really, really (, reall

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Robert Williams
also be useful to the world :-). -Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Businesss Services, Inc. -- The Small Business Authority https://www.newtekreferrals.com/rewjr http://www.thesba.com/ Notice: This communication, including attachments, may co

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Robert Williams
at just pretend to do the functionality of the real ones, thus allowing you to test the main class without worrying about whether all the secondary classes upon which it relies will break anything. When you're ready to learn more about this, do a Google search for "php (inversion of contro

Re: [PHP] How does this code work?

2012-07-03 Thread Robert Williams
On Jul 2, 2012, at 22:15, "Jim Lucas" wrote: > I think you missed something here... > > The above function uses strtr() not strstr() Wow. I knew there had to be a simple, logical explanation (there was), that it would likely be one of those stupid things that I'd spot in two seconds the next m

[PHP] How does this code work?

2012-07-02 Thread Robert Williams
;s just late-Monday slowness on my part, but what's going on here? I have no intention of using this code, but I'd sure like to understand how it works! Regards, Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Businesss Services, Inc. -- T

Re: [PHP] Re: php batch/queue framwork

2012-06-30 Thread Robert Williams
Zend Server includes a job queue. It supports queuing up jobs directly in the UI or via a PHP API, and it includes a variety of scheduling and load management options. -- Bob Williams Notice: This communication, including attachmen

Re: [PHP] why is (intval('444-44444') == '444-44444') EQUAL??!

2012-06-21 Thread Robert Cummings
On 12-06-21 10:27 PM, Daevid Vincent wrote: Huh? Why is this equal??! php> $id = '444-4'; php> var_dump($id, intval($id)); string(9) "444-4" int(444) php> if (intval($id) == $id) echo 'equal'; else echo 'not equal'; equal or in othe

Re: [PHP] help with preg_match

2012-06-03 Thread Robert Williams
On Jun 3, 2012, at 17:28, "Chris Purves" wrote: > I know that the text ends 'end', but I don't know what the Something, > something is. I am using preg_match as follows: > > preg_match('/[^>]*end/',$curl_response,$matches); > > I want to match 'end' and everything before it that is not '>'. You

Re: [PHP] Function size

2012-05-29 Thread Robert Cummings
On 12-05-29 07:17 AM, Stuart Dallas wrote: > I wasn't going to respond to this thread because I think it's a largely > ridiculous topic, but some of the responses have scared me. Sir Cummings > (hopefully) sarcastic response about using a 5px font size demonstrated > how daft it is to base funct

Re: [PHP] Function size

2012-05-23 Thread Robert Cummings
On 12-05-23 12:15 PM, Tedd Sperling wrote: On May 23, 2012, at 11:49 AM, shiplu wrote: On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote: When number of lines becomes the criteria of function size? Wouldn't it depends on the task the function is doing? You missed the point. Of course

Re: [PHP] To ?> or not to ?>

2012-04-04 Thread Robert Cummings
On 12-04-04 04:40 PM, Lester Caine wrote: ( forget email addres :( ) Robert Cummings wrote: On 12-04-04 02:42 PM, Lester Caine wrote: Tedd Sperling wrote: Let me start a religious war -- should one end their scripts with "?>" or not? Just as long as no one proposes makin

Re: [PHP] To ?> or not to ?>

2012-04-04 Thread Robert Cummings
On 12-04-04 02:42 PM, Lester Caine wrote: Tedd Sperling wrote: Let me start a religious war -- should one end their scripts with "?>" or not? Just as long as no one proposes making leaving out compulsory ;) While I can sort of understand the logic when the file is all php and just has an open

Re: [PHP] To ?> or not to ?>

2012-04-03 Thread Robert Cummings
On 12-04-04 01:14 AM, Donovan Brooke wrote: Robert Cummings wrote: [snip] Could using ob_start and ob_end_flush eliminate the ambiguity of whether or not to use '?>'? In the generally recommended case of don't use them at the end of your file... where's the ambiguity

Re: [PHP] To ?> or not to ?>

2012-04-03 Thread Robert Cummings
On 12-04-03 11:39 PM, Donovan Brooke wrote: Stuart Dallas wrote: [snip] Usually when setting headers after such a script has been included when output buffering is turned off. Personally I never put the closing ?> in if it's at the end of the file because it's unnecessary and can cause issue

Re: [PHP] To ?> or not to ?>

2012-04-03 Thread Robert Cummings
On 12-04-03 05:29 PM, Tedd Sperling wrote: Hi gang: Let me start a religious war -- should one end their scripts with "?>" or not? After years of never having a problem with ending any of my scripts with "?>", I found that several students in my class had scripts that did not produce the desi

Re: [PHP] Thinking out loud - a continuation...

2012-04-02 Thread Robert Cummings
On 12-04-02 04:36 PM, Jay Blanchard wrote: [snip] function getTiersJson( $company ) { $tiers = getTiers( $company ); $json = JSON_encode( $tiers ); } $tiersJson = getTiersJson( 1 ); ?> This will output JSON with the following structure: [/snip] OK, now I know I am being dense - but

Re: [PHP] Thinking out loud - a continuation...

2012-03-30 Thread Robert Cummings
On 12-03-27 11:11 AM, Jay Blanchard wrote: [snip]On 3/27/2012 12:21 AM, Robert Cummings wrote: >> [-- SNIP --] Essentially, entries at the root and entries for the children are just auto indexed array items but the actual entries in those arrays retain the associative index structu

Re: [PHP] Need PHP & Web Developer in So Cal

2012-03-28 Thread Robert Cummings
On 12-03-28 12:20 PM, Paul Scott wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/03/2012 18:04, Michael Frankel wrote: Hi - I am looking for a reliable, experienced PHP / Web developer or development company to assist me with one of my long-time clients. I need someone who has exper

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Robert Cummings
On 12-03-26 07:05 PM, Jay Blanchard wrote: [snip] On Mar 26, 2012, at 5:58 PM, Robert Cummings wrote: On 12-03-26 06:52 PM, Jay Blanchard wrote: [snip] Did you end up with a satisfactory output? It's not overly difficult to generate an array instead of an object. [/snip] I did for al

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Robert Cummings
On 12-03-26 06:52 PM, Jay Blanchard wrote: [snip] Did you end up with a satisfactory output? It's not overly difficult to generate an array instead of an object. [/snip] I did for all but this one instance. Are you saying that it would be easy to make of the children arrays? I thought they w

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Robert Cummings
On 12-03-26 05:14 PM, Jay Blanchard wrote: [snip] *lol* No worries... it's all about solving problems :) [/snip] the other folks who needed to consume the JSON have all done so successfully today - just this one. The guy who runs it was plenty arrogant when I discussed with him. He is the on

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Robert Cummings
children groups that the output from json_encode() does not contain. I am ready to take a loss on this one but I really didn't lose - Robert gave me a great way to retrieve the data with one query and create valid JSON from it. Thanks again Robert! *lol* No worries... it's all about so

Re: [PHP] Thinking out loud - a continuation...

2012-03-24 Thread Robert Cummings
On 12-03-24 04:11 PM, Jay Blanchard wrote: [snip] One more little tweak may be required. The JSON looks like this {"Executives and Management":{"name":"Executives and Management","children":{ The first part {"Executives and Management": needs to be removed. I think I know what to do. [/snip]

Re: [PHP] Thinking out loud - a continuation...

2012-03-24 Thread Robert Cummings
On 12-03-24 01:09 PM, Jay Blanchard wrote: [snip]The crux of it is: $focus =&$focus[$name]; [/snip] It works as I expect so far. All I have to do is figure out how to make the element a name: element in the JSON. for instance an element would look like this { name: "Bob", child

Re: [PHP] Thinking out loud - a continuation...

2012-03-24 Thread Robert Cummings
On 12-03-24 08:41 AM, Jay Blanchard wrote: On Mar 23, 2012, at 11:24 PM, Robert Cummings wrote: On 12-03-23 05:41 PM, Jay Blanchard wrote: [-- DELETED GARBAGE --] :) I just realized... I've been stuck in a thinking rut. I latched onto one solution that works well in some case but d

Re: [PHP] foreach weirdness

2012-03-24 Thread Robert Cummings
On 12-03-24 11:15 AM, Al wrote: On 3/23/2012 10:11 PM, Robert Cummings wrote: On 12-03-23 06:30 PM, Simon Schick wrote: 2012/3/23 Robert Cummings On 12-03-23 11:16 AM, Arno Kuhl wrote: it still does not produce the correct result: 0 1 3 6 10 15 21 0 1 3 6 10 15 15 This looks like a

Re: [PHP] Thinking out loud - a continuation...

2012-03-23 Thread Robert Cummings
On 12-03-23 05:41 PM, Jay Blanchard wrote: [-- DELETED GARBAGE --] :) I just realized... I've been stuck in a thinking rut. I latched onto one solution that works well in some case but didn't fully examine the nuances of your own scenario. Given the way you are creating your hierarchy you w

Re: [PHP] Thinking out loud - a continuation...

2012-03-23 Thread Robert Cummings
nd still cannot find the issue. I'll push away for a while and come back to it. Robert I owe you so many thinks for getting me this far and opening me up to making this more efficient. I just have to push on through and get to the point where the JSON can be created and consumed. If any lig

Re: [PHP] foreach weirdness

2012-03-23 Thread Robert Cummings
On 12-03-23 06:30 PM, Simon Schick wrote: 2012/3/23 Robert Cummings On 12-03-23 11:16 AM, Arno Kuhl wrote: it still does not produce the correct result: 0 1 3 6 10 15 21 0 1 3 6 10 15 15 This looks like a bug... the last row should be the same. What version of PHP are you using? Have you

Re: [PHP] Thinking out loud - a continuation...

2012-03-23 Thread Robert Cummings
On 12-03-23 03:52 PM, Jay Blanchard wrote: [snip] SELECT DISTINCT `TIER3DATA` AS id, `TIER2DATA` AS parentId FROM `POSITION_SETUP` WHERE `COMPANY_ID` = '3' AND `TIER2DATA` IN ('Executives and Management','Professionals','Technicians','Craft Workers-Skilled','Operatives','Contractor','Sales Wor

Re: [PHP] Thinking out loud - a continuation...

2012-03-23 Thread Robert Cummings
On 12-03-23 03:28 PM, Jay Blanchard wrote: On Mar 23, 2012, at 2:25 PM, Robert Cummings wrote: On 12-03-23 03:17 PM, Jay Blanchard wrote: [snip] $json = JSON_encode( $root ); [/snip] Update on my test. This works perfectly Robert - thank you very much! But there is one small problem

Re: [PHP] foreach weirdness

2012-03-23 Thread Robert Cummings
On 12-03-23 02:04 PM, Arno Kuhl wrote: Hi Rob I'm using php 5.3.5. What result do you get when you run this code? I haven't checked any bug reports, I'll google to see where I would do that. Your code gets round the problem, but I was specifically referring to the use of foreach with its unexp

Re: [PHP] Thinking out loud - a continuation...

2012-03-23 Thread Robert Cummings
On 12-03-23 03:22 PM, Jay Blanchard wrote: [snip] $json = JSON_encode( $root ); [/snip] Update on my test. This works perfectly Robert - thank you very much! But there is one small problem that I am trouble-shooting: it only goes one layer and doesn't progress any further. I suspe

Re: [PHP] Thinking out loud - a continuation...

2012-03-23 Thread Robert Cummings
On 12-03-23 03:17 PM, Jay Blanchard wrote: [snip] $json = JSON_encode( $root ); [/snip] Update on my test. This works perfectly Robert - thank you very much! But there is one small problem that I am trouble-shooting: it only goes one layer and doesn't progress any further. I suspe

Re: [PHP] Thinking out loud - a continuation...

2012-03-23 Thread Robert Cummings
On 12-03-23 02:08 PM, Jay Blanchard wrote: [snip] Your data structure doesn't appear to be very ummm normalized... Nonetheless, the following should do it: [/snip] You're absolutely correct. Unfortunately I am not the designer and cannot really do anything about it. I just have to work with

Re: [PHP] foreach weirdness

2012-03-23 Thread Robert Cummings
On 12-03-23 11:16 AM, Arno Kuhl wrote: The following snippet is copied from the php manual: foreach ($arr as $key => $value) { echo "Key: $key; Value: $value\n"; } I've always used the foreach loop that way. But recently I started hitting some really odd problems. See this following ex

Re: [PHP] set_error_handler() only triggering every Nth time

2012-03-22 Thread Robert Cummings
On 12-03-22 03:57 PM, Daevid Vincent wrote: Resending since I didn't get a single reply. Maybe it got lost? -Original Message- Sent: Tuesday, March 13, 2012 5:58 PM I am implementing a custom error handler and started noticing some bizarre behavior. Every Nth time I refresh the page, I

Re: [PHP] Thinking out loud - a continuation...

2012-03-22 Thread Robert Cummings
On 12-03-22 03:54 PM, Jay Blanchard wrote: [snip] At one point you indicated all the data was coming from one table. Can you send me the table fields and indicate which fields are used to determine parent child relationship? Also 2 sample rows of data which have a relationship would be helpfu

Re: [PHP] Thinking out loud - a continuation...

2012-03-22 Thread Robert Cummings
On 12-03-22 01:06 PM, Jay Blanchard wrote: On 3/22/2012 11:40 AM, Robert Cummings wrote: What's the field for which you are selecting data? I've written this up as a parent/child relationship but it works for data/sub-data relationships also. SELECT itemId, otherData FROM table W

Re: [PHP] Thinking out loud - a continuation...

2012-03-22 Thread Robert Cummings
On 12-03-22 12:34 PM, Jay Blanchard wrote: [snip] Sorry, I just realized I didn't make the optimization explicitly obvious... when I say "Select the children" I mean to select them using an IN( id1, id2, id3 ) clause instead of a query for each. This is why we build the array of parent IDs (also

Re: [PHP] Thinking out loud - a continuation...

2012-03-22 Thread Robert Cummings
On 12-03-22 11:58 AM, Jay Blanchard wrote: [snip] Fix this code... I've come across codebases that did this specific type of nested querying and it resulted in 1 queries to the database on every page. Instead, create a layered approach: 1. Select your root elements. 2. Loop over i

Re: [PHP] Thinking out loud - a continuation...

2012-03-22 Thread Robert Cummings
On 12-03-22 11:58 AM, Jay Blanchard wrote: [snip] Fix this code... I've come across codebases that did this specific type of nested querying and it resulted in 1 queries to the database on every page. Instead, create a layered approach: 1. Select your root elements. 2. Loop over i

Re: [PHP] Thinking out loud - a continuation...

2012-03-22 Thread Robert Cummings
On 12-03-22 11:28 AM, Jay Blanchard wrote: [snip] ...stuff... [/snip] Here is the explanation for what I have done and what I am trying to do - (based on the customer's request). A week or so ago I took a set of queries from one table and made them into an unordered list. This will be pseudo-co

Re: [PHP] Thinking out loud - a continuation...

2012-03-21 Thread Robert Cummings
On 12-03-21 04:42 PM, Jay Blanchard wrote: [snip] Why are you trying to create the JSON structure in parts? When I have nesting like this i build the full nested structure as PHP, then export to JSON. [/snip] As PHP? An array? Yeah sorry... you know what I meant ;) Cheers, Rob. -- E-Mail D

Re: [PHP] Thinking out loud - a continuation...

2012-03-21 Thread Robert Cummings
On 12-03-21 03:52 PM, Jay Blanchard wrote: [snip] I would, yes, but that's not the point. Is Anna single? I'm ready to trade Debs in for a newer model. [/snip] I'm thinking that Debs would upset your array if you traded her in. Anyhow, I have spent the last hour trying to output valid J

Re: [PHP] CMS identification

2012-03-18 Thread Robert Cummings
On 12-03-18 06:42 PM, Stuart Dallas wrote: On 18 Mar 2012, at 22:32, Alain Roger wrote: ok so here it is: http://i220.photobucket.com/albums/dd277/alainroger/cms-login.png Pass, not one I'm familiar with and a Google Image search for cms login doesn't show anything similar. If I were you I'

Re: [PHP] iphone & php

2012-03-05 Thread Robert Williams
hy the behavior of the 'number' type changed. There are others, too; see: <https://developer.apple.com/library/safari/#documentation/appleapplication s/reference/SafariHTMLRef/Articles/InputTypes.html> <http://www.w3schools.com/html5/att_input_type.asp> Regards, Bob -- Robert E.

[PHP] time/task reporting

2012-03-01 Thread Robert Nilsson
Hi, Ok, I admit -I'm lazy! Been asked to make a reporting tool, what and how many hours spent on Possible with a save option, to enable continuously adding during the week, before sending off by mail to manager and one self. Surely I'm not the first person looking at a similar tool, been sear

Re: [PHP] Arrays: Comma at end?

2012-02-08 Thread Robert Cummings
On 12-02-08 01:12 PM, Micky Hulse wrote: On Wed, Feb 8, 2012 at 10:08 AM, Robert Cummings wrote: JavaScript in Internet Crapsplorer spanks you on the bottom every time you have a trailing comma in a JS array. That may be where you picked up the aversion. On Wed, Feb 8, 2012 at 10:10 AM

Re: [PHP] Arrays: Comma at end?

2012-02-08 Thread Robert Cummings
On 12-02-07 02:50 PM, Micky Hulse wrote: Was there ever a time when having a comma at the end of the last array element was not acceptable in PHP? I just did a few quick tests: ... and it looks like having that comma ain't no big deal. I can't believe that I

Re: [PHP] Arrays: Comma at end?

2012-02-07 Thread Robert Williams
add, remove, or reorder elements without worrying about accidentally breaking the syntax. Much like always using braces around flow-control blocks, this practice makes future bugs less likely to be born. Now if only we could have support for trailing commas in SQL UPDATE/INSERT field and value lists...

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Robert Cummings
On 12-02-06 11:35 AM, Alain Williams wrote: On Mon, Feb 06, 2012 at 09:28:10AM -0700, Larry Martell wrote: On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams wrote: If I survey my code I find that I use one GOTO in about 4,000 lines of code - that I do not find excessive. There are, however, pe

Re: [PHP] Long Live GOTO

2012-02-06 Thread Robert Cummings
On 12-02-06 11:58 AM, Tim Streater wrote: On 06 Feb 2012 at 09:48, Adam Richardson wrote: On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardsonwrote: On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater wrote: I disagree that the nested function is a straw-man. I (just as the other authors I'd linked

Re: [PHP] Long Live GOTO

2012-02-06 Thread Robert Cummings
On 12-02-06 04:07 AM, Tim Streater wrote: On 06 Feb 2012 at 07:47, Adam Richardson wrote: While not purely focused on PHP, I toss this out to the group because I believe there are some novel, interesting points regarding the potential benefits of using the goto construct as implemented in PHP:

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Robert Cummings
On 12-01-23 09:29 PM, Alex Nikitin wrote: Have you done image processing? In my experience, with image generation, photography and processing, typically you are bound by resources when processing large amount of files than your connection, or sometimes even disk io. It really depends on what yo

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Robert Cummings
On 12-01-23 01:32 PM, Alex Nikitin wrote: If you don't mind me asking, if you want performance, which is kind of essential if you are processing a large number of files, why are you doing it in PHP? -- The trouble with programmers is that you can never tell what a programmer is doing until it’s

Re: [PHP] Numeric help needed

2012-01-15 Thread Robert Williams
On Jan 15, 2012, at 19:00, "Simon J Welsh" mailto:si...@welsh.co.nz>> wrote: On 16/01/2012, at 2:48 PM, Chris Payne wrote: "If the loan amount is $68500.00, the insurace will be based on $69000.00 as the amount is always rounded up to the next $1000." The round() function only rounds decimal va

Re: [PHP] PDF Printing instead?

2012-01-06 Thread Robert Williams
a compiled binary that you install, it's very fast (and easily used from PHP via exec() and family). Regards, Bob -- Robert E. Williams, Jr. Associate Vice President of Software Development Newtek Businesss Services, Inc. -- The Small Business Authority https://www.newtekreferrals.com/rewj

Re: [PHP] New to mac and trying to define a php.ini file.

2012-01-04 Thread Robert Williams
nd to the settings controlled via System Preferences). Here's what that call returns when run on the command line on my system: H012316WHPV:~ rewilliams$ systemsetup -gettimezone Time Zone: America/Phoenix Regards, Bob -- Robert E. Williams, Jr. Associate Vice President o

Re: [PHP] New to mac and trying to define a php.ini file.

2012-01-04 Thread Robert Williams
running, avoids PHP errors if you forget to make the change in a script, avoids you having to modify all your scripts in the first place, and lets you easily change the time zone used by your applications to whatever you want independently of the server's own time zone (or in 5.4, to somethi

Re: [PHP] number_format

2011-12-19 Thread Robert Cummings
On 11-12-19 11:08 AM, Bastien Koert wrote: On Mon, Dec 19, 2011 at 9:19 AM, Floyd Resler wrote: In the previous version of PHP we were using, I could pass a string to number_format and it would just change it to a 0 without complaint. With 5.3.6 I get an "expects double" error. I don't supp

  1   2   3   4   5   6   7   8   9   10   >