How to query MYSQL when clicked?
Posted
by Sam
on Stack Overflow
See other posts from Stack Overflow
or by Sam
Published on 2010-06-17T09:48:53Z
Indexed on
2010/06/17
9:53 UTC
Read the original article
Hit count: 219
Hello, I have a while statement, echoing my whole database that match a WHERE parameter. How can I make it so when I click on something (anything for the moment), it updates that specific row. Here's my code.
while($request = mysql_fetch_array( $request_db )) {
echo "<tr><td style=\"width:33%;padding:1px;\">";
echo $request['SongName'];
echo "</td><td style=\"width:33%;\">";
echo $request['Artist'];
echo "</td><td style=\"width:33%;\">";
echo $request['DedicatedTo'];
echo "</td><td style=\"width:33%;\">";
echo "UPDATE A ROW's 'Hasplayed' value to '1'.";
echo "</td></tr>";
}
echo "</table>";
Thanks!
© Stack Overflow or respective owner