ctcp Posted June 10, 2009 Share Posted June 10, 2009 i got table ID name type date and options in options i got Yes or No .. this is my result.php page but i whant view result only whith Yes if options if No do not view on result.php plz help .. <?php // Connect to server and select databse. mysql_connect("$hostname_files", "$username_files", "$password_files")or die("cannot connect"); mysql_select_db("$database_files")or die("cannot select DB"); $sql = "SELECT * FROM crackz ORDER BY id DESC LIMIT 30"; #$sql="SELECT * FROM $tbl_name"; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> <?php while($rows=mysql_fetch_array($result)){ ?> <table width="100%" border="0" align="center"> <tr> <td width="58%" align="left"><a href="./?id=<?php echo $rows['id']; ?>"><?php echo $rows['name']; ?></a></td> <td width="18%" align="center"><?php echo $rows['type']; ?></td> <td width="24%" align="center"><?php echo $rows['date']; ?></td> </tr> <tr> <td height="15" colspan="3" align="left" bgcolor="#F8F0E0"><hr /></td> </tr> </table> <?php } ?> thanks you :-) Link to comment https://forums.phpfreaks.com/topic/161684-php-show-result/ Share on other sites More sharing options...
Maq Posted June 10, 2009 Share Posted June 10, 2009 Change your query to only select the ones with options of 'yes'. $sql = "SELECT * FROM crackz WHERE options = 'Yes' ORDER BY id DESC LIMIT 30"; Link to comment https://forums.phpfreaks.com/topic/161684-php-show-result/#findComment-853111 Share on other sites More sharing options...
ctcp Posted June 10, 2009 Author Share Posted June 10, 2009 thank you mate :-) Link to comment https://forums.phpfreaks.com/topic/161684-php-show-result/#findComment-853114 Share on other sites More sharing options...
Maq Posted June 10, 2009 Share Posted June 10, 2009 thank you mate :-) You're welcome. Did that work the way you wanted it to? If so, mark as solved. Link to comment https://forums.phpfreaks.com/topic/161684-php-show-result/#findComment-853115 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.