Re: [PHP] mysql problems

2011-05-11 Thread Sean Greenslade
On Wed, May 11, 2011 at 2:25 PM, Curtis Maurand 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, "SELECT

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 > 2

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 new

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 fir

Re: [PHP] Odd array_push issue

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 1:50 PM, Peter Lind 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 isn't modifying the obj

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
On 11 May 2011 22:39, Richard S. Crawford wrote: > On Wed, May 11, 2011 at 1:30 PM, Peter Lind wrote: >> >> On 11 May 2011 22:23, Richard S. Crawford 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...

Re: [PHP] Odd array_push issue

2011-05-11 Thread Richard S. Crawford
On Wed, May 11, 2011 at 1:30 PM, Peter Lind wrote: > On 11 May 2011 22:23, Richard S. Crawford 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 execu

Re: [PHP] Odd array_push issue

2011-05-11 Thread David Harkness
On Wed, May 11, 2011 at 1:23 PM, Richard S. Crawford wrote: > 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 repeated thro

Re: [PHP] Odd array_push issue

2011-05-11 Thread Peter Lind
On 11 May 2011 22:23, Richard S. Crawford 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); > array_push(o

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 wrote: > is generally NOT what the short tags controversy are about. > > It's the use of vs. > This is the same thing my colleague told me when I first joined and began learning PHP and is the reason we use stupid reason), the issue is that

[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] 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

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 is the 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: http://facebook.com/menelion Original

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 eve

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" wh

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" wh

[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 fu

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/)

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

[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 my

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_GR

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 InputField1

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 , 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 , and forgive configuration options. Alej