Jump to content

[SOLVED] How do you....?


HoTDaWg

Recommended Posts

[code]
checksongexistence(){
$songrequest = "SELECT * FROM songs WHERE songname='".$songname."' AND songartist='".$songartist."'";
$checksongexistence = mysql_query($songrequest,$conn);

if($checksongexistence){
$query="UPDATE songs SET votes='$addvote' WHERE songname='$songname' AND songartist='$songartist'";
mysql_query($query);

if($query){
echo "Your request was submitted succesfully";
}else{
echo "An error occured, your request was not successful";
}else{
insertintodb();
}
[/code]

how do you +1 to a number inside of a database?
Link to comment
https://forums.phpfreaks.com/topic/32504-solved-how-do-you/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.