Hello,
In one table row called Profiles_Shoppers I plan to have up to 5 IP address fields.
What I'm wondering is if I can make a query like this or if this would be proper to do this way.
$p_arr = db_arr( "SELECT ID, NickName, Password From Profiles_shoppers WHERE IPAddress1 = $IP OR IPAddress2 = $IP OR IPAddress3 = $IP OR IPAddress4 = $IP OR IPAddress5 = $IP" );
Basically I'm sending them a cookie as soon as they hit my shopping page, I'll create a temporary ID nickname etc for the cookie but if the user doesn't by something I don't want to force them to login if all they want to do is look around and if they have come back say within a week or two I don't want to create a new table row for them, so I want to check to see if their IP has been here before.
I just want to know if using the OR in the WHERE part of a select statement would work? of if it's poper to do?