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));
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
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
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
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
]
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
6 matches
Mail list logo