PHP SQL Query - Select All Associated w/ Specific Value? -


i use assistance sql query. have small 3 column table, id, ip, , birthday. id auto increments.

i'm trying select birthdays associated specific ip, i'm not sure if sql statement wrote correct. if check me appreciated.

$query = "select birthday, count(ip) $table group ip having ( count(ip) > 1) ip=$ip"; 

to birthdays specific ip you'd query:

select birthday table ip="desired value here" 

if you're trying count information, use:

select ip, count(*) `total` table id="desired value here" group ip 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -