Jump to content

MYSQL Logic question


godsent

Recommended Posts

OK here is what I'm trying to do.

 

Where is row in my database with IP's which they are separated with space between. Ex: 127.0.0.1 127.0.0.2 127.0.0.3...

 

And I'm trying to write function to check every row, and if in that row where is specified IP +1count. I mean to count how many rows have specified IP.

 

Im not sure how can i do that:

 

function countRows($ip)
{
   $res = mysql_query("SELECT * FROM list WHERE ips = ?????");
   $num_rows = mysql_num_rows($res);
   return $num_rows;
}

 

I have no idea how to do this, please help if you can. :)

Link to comment
https://forums.phpfreaks.com/topic/154613-mysql-logic-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.