Answer the question
In order to leave comments, you need to log in
Correct spelling of sql query?
Is this sql query correct?
$res = mysqli_query($connection, "SELECT * FROM `video_category` WHERE `category_id` AND `video_id` = " . (int)$_GET['id']);
Answer the question
In order to leave comments, you need to log in
$res = mysqli_query($connection, "SELECT * FROM `video_category` WHERE `category_id` AND `video_id` = " . (int)$_GET['id']);
You don't have an ID for category_id in this request at all - this is the first time.
Secondly, if the IDs are different, then different ones need to be substituted - in the form where you request the ID, name them differently, for example category_id and video_id and then it will be $_GET['category_id'], $_GET['video_id'] - you do not need to name the variable id, but substitute a specific value.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question