SELECT data from one row IF another row = 1?
I need it so that my site displays the information from the database IF the row: "active" = 1.
This is what I have so far:
There is no if function so far, I'm very new to mysql :P
mysql_connect("localhost", "", "");
<p>Here at HabFab, we're always looking for new staff to help keep our sites running. Without the staff of HabFab, we wouldn't be open. Fancy working for us? The below job applications are currently open. Remember you must be registered on our forum in order to apply for any job position. Simply click the job that takes your fancy and fill in the application form! You will be notified via Private Message on the forum if you have been successful, so be sure to check your private messages! We wish you the best of luck in your application!</p><br>
$data = mysql_query("SELECT * FROM mybb_forms")
$info = mysql_fetch_array( $data );
while($info = mysql_fetch_array( $data ))
Print "<a href=http://habfab.com/forum/jobs.php?id=".$info['form_id'] . " target=_blank>" .$info['name'] . "</a><br><br>";
But I need it so that if the row active = 1, the data from that row displays from the database, but only those that say 1, any that say 0 mustn't display.