Would someone please explain to me what is wrong with this??
SELECT COUNT (`ID`) FROM `tableImSpecifying` WHERE `VisitorsEmail` = \'$VarThatHoldsEmailFromA$_
Change:
SELECT COUNT (`ID`)
to
SELECT COUNT(`ID`)
The space is messing it up.
MYSQL doesn't like white space after function names. Try taking out the space after COUNT.
I also take it that those variable names are just an example and your not actually using them in production!
I also encountered the same problem while running the query
SELECT MIN (released_year) FROM books
where i encountered the error
FUNCTION records.MIN does not exist.
Check the 'Function Name Parsing and Resolution' section in the Reference Manual.
But it worked when i removed the space between MIN and (released_year) so the correct one is:
SELECT MIN(released_year) FROM books
This:
FUNCTION myhost_classifieds.COUNT does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
Would prompt you to read this
Which leads you to alter this:
COUNT (`ID`)
To:
COUNT(`ID`)
(note the removed space).
(you could also fiddle around with IGNORE_SPACE, but I wouldn't recommend it for a novice.
try this
SELECT COUNT(`ID`) FROM `tableImSpecifying` WHERE `VisitorsEmail` = '$VarThatHoldsEmailFromA$_POSTInput'
^^-------remove space here
In simple terms, according to Wrikken, on the SQL Manual it says,
To use the name as a function call in an expression, there must be no whitespace between the name and the following ( parenthesis character.
So the expression,
SELECT COUNT (`ID`) FROM `tableImSpecifying` WHERE `VisitorsEmail` = '$VarThatHoldsEmailFromA$_POSTInput'
doesn't work because there is a whitespace between COUNT and the ( ). Simply remove the whitespace and change it to:
SELECT COUNT('ID') ...