lJesterl Posted September 1, 2006 Share Posted September 1, 2006 I'm working on a page that selects id, alias, and ipaddress from table users and it then lists it to a webpage. I worked everything out and it post my table to the website and sorts by IP. Exactly how I want it to. The only problem is that im trying to get it to list DUPLICATE in the <td> beside the ip address so that I can see when viewing my user database wich accounts are duplicate ip's. I am farely new to php and I'm not sure what the value to X in my code should be or if i should use a different method. Any help would be great. Here is a snip from some of my code.$getipinfo = mysql_query("SELECT * FROM users ORDER BY ipaddress ASC");while(list($id,$alias,$pass,$email,$icq,$aim,$yahoo,$website,$logo,$newsletter,$joindate,$ipaddress)=mysql_fetch_row($getipinfo)){ $ip=mysql_query("SELECT ipaddress from users");$iconlist="";if($ipaddress =="[color=red]x[/color]")){$iconlist=$iconlist."<font color=#FF0000><b>DUPLICATE</b></font> ";} $userlist = $userlist." <tr> <td bgcolor=202020>$id</td> <td bgcolor=202020>$alias</td> <td bgcolor=202020>$ipaddress</td> <td bgcolor=202020>$iconlist</td>"; $userlist = $userlist Link to comment https://forums.phpfreaks.com/topic/19334-check-for-duplicate-rows/ Share on other sites More sharing options...
lJesterl Posted September 1, 2006 Author Share Posted September 1, 2006 =[ Link to comment https://forums.phpfreaks.com/topic/19334-check-for-duplicate-rows/#findComment-84005 Share on other sites More sharing options...
samshel Posted September 1, 2006 Share Posted September 1, 2006 What output do you get ? Can you paste the HTML you get in the View Source of the page ? Link to comment https://forums.phpfreaks.com/topic/19334-check-for-duplicate-rows/#findComment-84010 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.