I have a database of a few songs with a few tables which are:
Database_table playlist
with the following columns:
Song_timing
Song_title
Song_artist
Song_status
I want to be able add the value of 1 to the table Song_status
(its either 0 or 1)
mysql_query("SELECT 'PLAYLIST' INSERT 1 INTO song_status WHERE song_timing like '$today%' GROUP BY song_title HAVING COUNT(song_title)>1");
The current syntax doesn't display an error at all it just doesn't work.
If you want to increment a value, then use update
not insert
. Something like:
update play_list
set song_status = song_status + 1
where date(song_timing) = date(now())
Your attempted syntax is quite broken. It should be returning some syntax error, probably on the 1
or the into
.