Exclude a MySQL result
March 8th, 2010 |
|
0 Comments »
Question:
I have a php page that shows some mysql results on a page. I would like to filter the
$cp_action = $got_data['action'];
One action it shows is “move”.. I would like to filter this out so it shows every action, except “move”
The line below defines “action”
while($got_data = mysql_fetch_array($tmp)) {
$cp_action = $got_data['action'];
This line calls it onto the page:
<?php echo $cp_action;?></td>
But I’m not sure how I can filter out “move”
Solution:
if ($got_data['action'] != ‘move’) {
$cp_action = $got_data['action'];
}
–ss













Comments (0)
Trackbacks - Pingbacks (0)
Leave a Reply