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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -