php-general Digest 11 May 2011 11:38:09 -0000 Issue 7307

2011-05-11 Thread php-general-digest-help
php-general Digest 11 May 2011 11:38:09 - Issue 7307 Topics (messages 312743 through 312756): Re: Bold links 312743 by: Stuart Dallas 312746 by: Micky Hulse 312747 by: Joshua Kehn 312748 by: Adam Richardson 312749 by: Ashley Sheridan 312751

RES: [PHP] Short tag: why is it bad practice?

2011-05-11 Thread Alejandro Michelin Salomon (Hotmail)
Andre : As Joshua says, the only php tags that always is enabled is ?php ?, this is the default php tag, and never can be disabled. This ? ? is enabled if short_open_tag is on And this % % is enabled if asp_tags is on But the default is off for both. Use this ?php ?, and forgive configuration

Re: Fwd: [PHP] Storing indefinite arrays in database

2011-05-11 Thread Benedikt Voigt
Bastien, thanks for the answer. But as I understand the problem and your suggestion, this won’t work, or you have to explain it to me with this example. For example, let’s reduce the function to two input fields and the following functioning: InputField1=A InputField2=B OutputField=X

Re: [PHP] How in PDOStatement-fetchAll use PDO::FETCH_GROUP for grouping more than one column simultaneously?

2011-05-11 Thread Gerardo Benitez
Hi Mikhail, I think FETCH_GROUP not work in these way, anyway, do you need work with arrays? you can do the same with a simple record, i think... Gerardo. On Tue, May 10, 2011 at 5:03 PM, Михаил Гаврилов mikhail.v.gavri...@gmail.com wrote: How in PDOStatement-fetchAll use PDO::FETCH_GROUP

[PHP] mysql problems

2011-05-11 Thread Curtis Maurand
I'm running PHP 5.3.6, Mysql 5.1.51 and Apache 2.2.17 I have code that does a simple mysql_query();  the query on the commandline returns an empty set.  when run via PHP and the web server, the page hangs, it never gets to the if (mysql_num_rows($result) 0) {}. and the queries per second on

Re: [PHP] mysql problems

2011-05-11 Thread Marc Guay
Does anyone have any ideas? Sounds like it's getting caught in a loop. Post the whole script for best results. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How in PDOStatement-fetchAll use PDO::FETCH_GROUP for grouping more than one column simultaneously?

2011-05-11 Thread Михаил Гаврилов
Hi Gerardo. Of course I can make grouping array by using PHP functions, but if function fetchAll with parameter PDO::FETCH_GROUP will be have this feature. The described variant will be more clean and beautiful. -- Best Regards, Mike Gavrilov. -- PHP General Mailing List (http://www.php.net/)

[PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Shawn McKenzie
On 05/10/2011 03:16 PM, Benedikt Voigt wrote: Hi, I'am very new to PHP, so please any comment is welcome. I want to write a function in PHP, which takes X arguments and outputs a value. The functioning of this function should be stored in a db (mydb? or better alternatives?) The function

Re: [PHP] mysql problems

2011-05-11 Thread Curtis Maurand
Marc Guay wrote: Does anyone have any ideas? Sounds like it's getting caught in a loop. Post the whole script for best results. It looks like the site is under attack, because I keep seeing the query, SELECT catagory_parent FROM t_catagories where catagory_ID= . $_currentCat where

Re: [PHP] mysql problems

2011-05-11 Thread Curtis Maurand
Marc Guay wrote: Does anyone have any ideas? Sounds like it's getting caught in a loop. Post the whole script for best results. It looks like the site is under attack, because I keep seeing the query, SELECT catagory_parent FROM t_catagories where catagory_ID= . $_currentCat where

RE: [PHP] Short tag: why is it bad practice?

2011-05-11 Thread Daevid Vincent
-Original Message- From: Joshua Kehn [mailto:josh.k...@gmail.com] Sent: Tuesday, May 10, 2011 8:19 AM To: Andre Polykanine Cc: php-general@lists.php.net Subject: Re: [PHP] Short tag: why is it bad practice? On May 10, 2011, at 11:11 AM, Andre Polykanine wrote: Hi everyone,

Re: [PHP] Short tag: why is it bad practice?

2011-05-11 Thread Andre Polykanine
Hello, So, as I've understood, the only issue with ? // blah-blah ? is the ?xml version 1.0? thing? Thanks! -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook:

Re: [PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Benedikt Voigt
Thanks Shawn, yes, your second idea works for me. The first one not, as I need to search and join on it. To continue your second idea with your example: Arguments: id results_id variablevalue 1 1 1 800 2 1 2

[PHP] Odd array_push issue

2011-05-11 Thread Richard S. Crawford
I'm encountering what appears to be a bug in array_push when I try using that function to add objects to an array. For example... A = Object 1 B = Object 2 If I execute the following code: array_push(objectarray, A); array_push(objectarray, B); ...I expect the contents of $objectarray to be:

Re: [PHP] Short tag: why is it bad practice?

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 11:55 AM, Daevid Vincent dae...@daevid.com wrote: ?= $foo ? is generally NOT what the short tags controversy are about. It's the use of ? Some php here ? vs. ?php some php here ? This is the same thing my colleague told me when I first joined and began learning PHP

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
On 11 May 2011 22:23, Richard S. Crawford rich...@underpope.com wrote: I'm encountering what appears to be a bug in array_push when I try using that function to add objects to an array. For example... A = Object 1 B = Object 2 If I execute the following code: array_push(objectarray, A);

Re: [PHP] Odd array_push issue

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 1:23 PM, Richard S. Crawford rich...@underpope.comwrote: If I execute the following code: array_push(objectarray, A); array_push(objectarray, B); ...I expect the contents of $objectarray to be: [0] = A [1] = B Instead, the last object pushed onto the array is

Re: [PHP] Odd array_push issue

2011-05-11 Thread Richard S. Crawford
On Wed, May 11, 2011 at 1:30 PM, Peter Lind peter.e.l...@gmail.com wrote: On 11 May 2011 22:23, Richard S. Crawford rich...@underpope.com wrote: I'm encountering what appears to be a bug in array_push when I try using that function to add objects to an array. For example... A = Object 1

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
On 11 May 2011 22:39, Richard S. Crawford rich...@underpope.com wrote: On Wed, May 11, 2011 at 1:30 PM, Peter Lind peter.e.l...@gmail.com wrote: On 11 May 2011 22:23, Richard S. Crawford rich...@underpope.com wrote: I'm encountering what appears to be a bug in array_push when I try using

Re: [PHP] Odd array_push issue

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 1:50 PM, Peter Lind peter.e.l...@gmail.com wrote: I'd say there's a problem in your code. Check where you might be using references, chances are you're using one somewhere and not unsetting it afterwards. Also make sure that the code that receives the final array

RE: [PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Jasper Mulder
Date: Wed, 11 May 2011 22:15:21 +0200 From: benedikt.vo...@web.de To: nos...@mckenzies.net CC: php-general@lists.php.net Subject: Re: [PHP] Re: Storing indefinite arrays in database Thanks Shawn, yes, your second idea works for me. The first one

Re: [PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Benedikt Voigt
Thank you Jasper, this also sounds like an interesting approach. But creating tables on the fly brings me to the idea, that I can also enlarge one table on the fly. Then I could consider the function as a matrice and store it in only one table, which can be enlarged dynamically. I am very

Re: [PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Shawn McKenzie
On 05/11/2011 03:15 PM, Benedikt Voigt wrote: Thanks Shawn, yes, your second idea works for me. The first one not, as I need to search and join on it. To continue your second idea with your example: Arguments: idresults_idvariablevalue 111800 21

Re: [PHP] mysql problems

2011-05-11 Thread Sean Greenslade
On Wed, May 11, 2011 at 2:25 PM, Curtis Maurand cur...@maurand.com wrote: Marc Guay wrote: Does anyone have any ideas? Sounds like it's getting caught in a loop. Post the whole script for best results. It looks like the site is under attack, because I keep seeing the query,