Warptweet Posted February 12, 2007 Share Posted February 12, 2007 At my websites address bar, it has ?flash=1 or something like ?flash=2. Now, heres my question... How can I fetch the info on a row in my MySQL database that has 1 or 2 (depending on what ?flash=x) For Example: If ?flash=1 Then php would fetch the row in my MySQL database with the "flash" column that has the value of 1 Link to comment https://forums.phpfreaks.com/topic/38111-fetch-one-row-from-mysql-database/ Share on other sites More sharing options...
Jessica Posted February 12, 2007 Share Posted February 12, 2007 SELECT * FROM table WHERE flash = '$flash'; You should read some of the db tutorials on here. Link to comment https://forums.phpfreaks.com/topic/38111-fetch-one-row-from-mysql-database/#findComment-182484 Share on other sites More sharing options...
The Little Guy Posted February 12, 2007 Share Posted February 12, 2007 ...OR... <?php $sql = mysql_query("SELECT * FROM table WHERE flash = '{$_GET['flash']}'")or die(mysql_error()); while($row = mysql_fetch_array($sql)){ echo $row['flash']; } ?> Link to comment https://forums.phpfreaks.com/topic/38111-fetch-one-row-from-mysql-database/#findComment-182490 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.