[PHP-DB] error on count()

2004-09-07 Thread Sancerni Veronica
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 =

Re: [PHP-DB] error on count()

2004-09-07 Thread Peter Ellis
You need to pass the functions a variable to work with because you've specified parameters. Try: $okuan = orderquantity($una); Ditto for the other function call. -- Peter Ellis - [EMAIL PROTECTED] Web Design and Development Consultant naturalaxis | http://www.naturalaxis.com/ On Tue,

Re: [PHP-DB] error on count()

2004-09-07 Thread zareef ahmed
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);