A music search program, soundcloud API, stores a song every time a user searches. {Code...} only one week before the database reached 500 M +. How can I limit the database entry to 10? A music search program, soundcloud API, stores a song every time a user searches.
Mysql_query ("insert into songs (s_id, name, artwork, views, favorites, duration, genre, owner, descr, download) VALUES ($ id, '$ name ', '$ artwork', $ views, $ favorites,' $ duration', '$ genre',' $ owner', '$ desc',' $ download ')");
It takes only one week for the database to reach 500 M +. How can we limit the database entry to 10?
Reply content:
A music search program, soundcloud API, stores a song every time a user searches.
Mysql_query ("insert into songs (s_id, name, artwork, views, favorites, duration, genre, owner, descr, download) VALUES ($ id, '$ name ', '$ artwork', $ views, $ favorites,' $ duration', '$ genre',' $ owner', '$ desc',' $ download ')");
It takes only one week for the database to reach 500 M +. How can we limit the database entry to 10?
1. First count, then delete, and then insert2. Stored Procedure