Re: Passing Variables

From: Date: Thu, 23 May 2002 21:52:13 +0000
Subject: Re: Passing Variables
References: 1  Groups: php.general php.windows 
Request: Send a blank email to php-general+get-98998@lists.php.net to get a copy of this message
Why do you need the group by clause? Do one or the other, not both. either do a select count(id) from table or select field, count(id) from table group by field Check your query, Nicole Amashta www.aeontrek.com James Opere wrote:
Hi All, I'm trying to pass variables from one form to the other.I have a problem when i want to do the the following: 1.COUNT($variable) 2.DISTINCT($variable) ............. I realise i can not use the brackets in my query and the variable be recognised.When i add COUNT without the brackets i still get an error. Example. test.html <form action="me.php" method="post"> <input type="text" name="this"> .............. This is sent to : me.php <?php $db=mysql_connect('localhost','',''); mysql_select_db($database,$db); $sql="select COUNT($this) from $table group by $this"; ................ ?> This gives an error. Please help.


« previous php.general (#98998) next »