So I am trying to learn some new(to me) techniques with mysqli. My goal is to learn how to do many to many with php and mysql.
I've never used execute commands and they seem new to me. Why do I have to use the mysqli_prepare() before using execute? Do I have to mysqli_stmt_fetch() too? I'm kind of fuzzy on this stuff to be honest.
Does anyone have any examples how to use these properly in a procedural style?
I am not a programmer, nor do I play one on tv.
As I remember from php tutorial there may be additional fields on table 'X', which means that the database update routine will have to deal with more than simply choosing between an insert or a delete.
A more complicated version is where table 'X' can contain multiple occurrences for each combination of 'a_id' and 'b_id'.