when no rows retrieved from SQL database then dont display a div

peettyHagma

New Member
i tried the empty selector in jquery but it doesnt work. the content is still being displayed. i am retrieving some rows from the SQL database.. if there is no database then i dont want to display that div.\[code\]<div id="scrollingText"><div class="scrollWrapper"><div class="scrollableArea"><marquee behavior="scroll" direction="left"><p><?php$con = mysql_connect("localhost","fraptech_test","");mysql_select_db("fraptech_test", $con);if (mysqli_connect_errno($con)) {echo "Failed to connect to MySQL: " . mysqli_connect_error(); }mysql_select_db("fraptech_ndsnotice", $con);$result = mysql_query("SELECT * FROM ndsnotice");while($row = mysql_fetch_array($result)) { echo $row['Notice']; }?></p></marquee></div></div></div>\[/code\]
 
Back
Top