I am trying to ececute this query on a php file but just can't get it to work. I'm a newbie, so please don't laugh at my attempt! hahahahaha
What I need is to get the total amount of fields from a table named JOS_THEMES, where VARIABLE = PROFILE_DOMICILE and VALUE = KMIA and VARIABLE = PROFILE_DIVISION and VALUE = APR
Here is my attempt at this:
Obviously, it's returning the count as "0", because I know that syntax is incorrect. Can anyone help me please?
What I need is to get the total amount of fields from a table named JOS_THEMES, where VARIABLE = PROFILE_DOMICILE and VALUE = KMIA and VARIABLE = PROFILE_DIVISION and VALUE = APR
Here is my attempt at this:
Code:
$query="SELECT COUNT( ID_MEMBER ) AS count_users"
. "\n FROM smf_themes"
. "\n WHERE variable = 'profile_domicile'"
. "\n AND value = 'KMIA'"
. "\n AND variable = 'profile_division'"
. "\n AND value = 'APR'"
;
Obviously, it's returning the count as "0", because I know that syntax is incorrect. Can anyone help me please?