I have following tables:
I want to insert data into user_category.Is there any way to insert data into user_category.user_id reference account.id and user_category.cat_id reference categories.cat_id.
I am doing this method but can't work:
mysqli->prepare("INSERT INTO `user_category` (`user_id`, `cat_id`)
prepare() function just only prepares query and does not execute it. In your case you can use
query() instead of