PHP Check of SQL query for value quantities -


i have script checking values in database. there 3 instances need check for.

1) no value present 2) single value exists 3) multiple values exist 

currently, have following script run first instance:

if($value){ echo ‘this showing if value exists’; }else{ echo ‘this showing if no value exists’; } 

how can add check if array of values exist?

we need see code retrieves data, if have array of data use count:

if (count($value) > 1) {     // multiple values } 

you may using select count in case can compare value:

if ($value["count"] > 1) { 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -