[PHP] MySQL arrays

2002-03-26 Thread Anzak Wolf
I'm trying to do something a little different in my database class I have a method to do the query and store it in an array. function query ($s = ) { $q = mysql_query($s,$this-database_connect_id); if (!$q) { $tools-error(array(Query Resulted in NULL value));

RE: [PHP] MySQL arrays

2002-03-26 Thread Rick Emery
how can you take a size of a function: $len = sizeof($this-query); and WTF (query is a function, not an array): $tq = $this-query[$q_id]; -Original Message- From: Anzak Wolf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 9:09 AM To: [EMAIL PROTECTED] Subject: [PHP] MySQL

RE: [PHP] MySQL arrays

2002-03-26 Thread Anzak Wolf
Sorry my mistake the array is $this-query_id the function is $query I still get the same results though. From: Rick Emery [EMAIL PROTECTED] To: 'Anzak Wolf' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] MySQL arrays Date: Tue, 26 Mar 2002 09:23:11 -0600 MIME-Version: 1.0

RE: [PHP] MySQL arrays

2002-03-26 Thread Rick Emery
will automatically be de-allocated. Also, when you use the phrase $q, you are creating a pointer to a pointer; is that what you want? -Original Message- From: Anzak Wolf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 9:09 AM To: [EMAIL PROTECTED] Subject: [PHP] MySQL arrays I'm trying

RE: [PHP] MySQL arrays

2002-03-26 Thread Anzak Wolf
CHANGE: $len = sizeof($this-query_id); $len++; $this-query_id = array($len=$q); mysql_free_result($q); return $len; TO: $this-query_id[] = $q; return sizeof($this-query_id); second: $q is a resource, that is, a pointer

RE: [PHP] MySQL arrays

2002-03-26 Thread Rick Emery
] Subject: RE: [PHP] MySQL arrays CHANGE: $len = sizeof($this-query_id); $len++; $this-query_id = array($len=$q); mysql_free_result($q); return $len; TO: $this-query_id[] = $q; return sizeof($this-query_id); second: $q