Heloo I would just like to ask if anyone knows of a way of searching the result of a mysql select all and to stop certain information from showing.
I'd like this as the database I am using has some unwanted information I wish not to be shown in the database while also having some information I wish to show so how would I go about censoring the result and stopping certain information from showing.
$query = "SELECT player, data_type, data FROM settings WHERE player = '$searchinfo'";
$result = mysql_query($query) or trigger_error(mysql_error().$query);
echo "<table><tr><th>Username</th>";
echo "<th>Class</th>";
echo "<th>Expirence</th>";
while ($row = mysql_fetch_array($result) or die($result."<br/><br/>".mysql_error())) {
if($result == "title-prefix") {
} else {
echo '<tr><td>'
. $row['player'] . '</td><td>'
. $row['data_type'] . '</td><td>'
. $row['data'] . '</td><td> ';
} }
} }
As you can see I tryed to use an if statement to cancel out that certain row but It didn't work.
Store a flag of permissions in the table for each row and modify your guard to test against that.