Re: MySQL COUNT Won't Work

From: Date: Fri, 16 Feb 2001 19:10:31 +0000
Subject: Re: MySQL COUNT Won't Work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40207@lists.php.net to get a copy of this message
On Friday 16 February 2001 18:27, Jeff Oien wrote: > I'm totally stuck on this code. I get the error > "Couldn't execute query." so I know where it's > failing but can't figure out what's wrong. I have > a database with 'title' as one of the fields. Based > on code in PHP Fast and Easy. > $sql = "SELECT COUNT (title) FROM music"; I found that often MySQL doesn't like if there's a space between the function name and the opening bracket, i.e. try writing "COUNT(title)" instead of "COUNT (title)". -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux)

« previous php.general (#40207) next »