hello, this is problably newbie question, but I can not understand why my count()
function doesn't work. I need to count how many items has a determinated customer
ordered ever.
1. I tired to get the array like this:
$una = $check["uname"];
function orderquantity ($una) {
$pss = mysql_query("SELECT OID FROM orders WHERE una = '".trim($una)."'") or die
(mysql_error("Query error on Order search"));
while($pisao=mysql_fetch_array($pss)) {
return count($pisao);
}
}
$okuan = orderquantity();
2. and like this:
$una = $check["uname"];
function orderquantity ($una) {
$pss = mysql_query("SELECT OID FROM orders WHERE una = '".trim($una)."'") or die
(mysql_error("Query error on Order search"));
return count($pss);
}
okuan = orderquantity();
None of them gave me a valid value, is it because the OID is an int value?
---------------------------------
Cr�ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Cr�ez votre Yahoo! Mail
Le nouveau Yahoo! Messenger est arriv� ! D�couvrez toutes les nouveaut�s pour
dialoguer instantan�ment avec vos amis.T�l�chargez GRATUITEMENT ici !