Search the Community
Showing results for tags 'triggers'.
Found 2 results
Hi, I have an adverts table that has records of currently running adverts, i have not used stored procedures or triggers before. I would like to create a stored procedure or a trigger using phpmyadmin for mysql. Exactly what i want to achieve is, when a record is accessed in adverts table, it causes a table called HITS to create a record that has the adverts_id, IP where the advert was clicked from, current date. Is that possible?
I have set up a Trigger... update a_players p join wp_terms t set p.wpID = t.term_id where t.slug = p.wpSlug ...and it works. These are relatively new data tables, and I had intended on the trigger to just deal with new entries (as Tags posted via WordPress). However, it ended up updating previously applicable rows, which didn't anticipate. It makes sense, but before I go live, I'm going create term_id / wpID matches for all previous rows. As of now, wp_terms is just 42 rows, but it will grow a great deal once the site actually goes live. a_players currently has 150 rows but it going to approach about 1,000 rows before I go live, growing around 250 rows per year. Should I narrow my trigger down? If I should narrow it down to just deal with new entries, what do I need to add? If It's going to check every row in both tables, will that bog down my site? Thank you.