Kestrad
-
Posts
7 -
Joined
-
Last visited
Never
Posts posted by Kestrad
-
-
I'm creating a php class, but I receive the following error: Wrong parameter count for mysql_fetch_assoc(). It tells me that the problem is in the constructor, which is as follows:
function __construct($arg1 = 0){ $q = mysql_fetch_assoc('getQuoteById', $arg1); $this->quote = $q['quote']; }
getQuoteById is a sql query:
SELECT id, quote FROM quote WHERE id=%d
where id and quote are the two columns in the table quote. Could someone please explain to me what this error means? Thanks!
-
if(($voted < 1)||($voted>5)) die;
do you need curly braces for this line?
-
Yep. I'm not getting the error anymore! Thanks for your help!
-
If the function doesn't take an argument, doesn't that mean I can't pass it one?
-
Sorry, I don't quite understand--do you mean that I can't define $id as another variable that already exists?
-
Hey all! I'm getting an unexpected T_VARIABLE with the following function:
function getHighestParentName($id = $this->cid){
$cat = mysql_fetch_assoc(fsquery('getParentCategories', $id));
if ($cat['pid']!=0){getHighestParentName($cat['id']);}
return $cat['name'];
}
fsquery is a function defined in another file, which I know is correctly defined and correctly referenced. pid, id, and name are column names in a mysql table. Can someone please help me find what's wrong? Thanks!
What does this error mean?
in PHP Coding Help
Posted
Okay, I understand! Thanks for clearing that up.