View Single Post
Old 11-18-2008, 10:16 PM   #7 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Ye, I've actually already implented this in my class.

Problem is:
if I choose assoc as FALSE, then the function will be
PHP Code:
mysql_fetch_array($this->query_result0); 
and that doesn't work, because if we don't want a CONST there, we shouldn't place ANYTHING there, including we should REMOVE the "," after the query result.

Also, the 1 didn't work either. I had to do this:
PHP Code:
$fetchType = ($assoc == true) ? MYSQL_ASSOC ''
but as I said earlier.. the '' don't work either.. it's just that if no constant will be used, you shouldn't use the 2nd parameter in the fetch_array function..

Any ideas how to solve this?

Btw: My code works as long as the assoc is true(which in most of my cases, if not all, is set to true).
__________________
Tanax is offline  
Reply With Quote