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
Post a Comment