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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -