I'm trying to INSERT certain items ORDER BY monster names,
For example there is an monster called 'SPIDER' this monster has certain items for example: 'bones, legs, more items' the drops of SPIDER are all in 'log_mitem'.
So my problem is when I hit SUBMIT I want just to create a 'log_create' which creates with success, but in the table 'log_drops' I need to INSERT all items of monster spider for E.X. as you see I've used $items and $dropslq for this one but it doesn't work.
$name = $db->real_escape_string(trim($_POST['name']));
$id = $db->real_escape_string(trim($_POST['id']));
$name2 = preg_replace('/\s+/', '', $name);
$game = $db->real_escape_string(trim($_POST['game']));
$info = $db->real_escape_string(trim($_POST['info']));
$mobname = $db->real_escape_string(trim($_POST['mobname']));
$sql = "INSERT INTO log_create(`name`, name2, game, monster, info)VALUES('$name', '$name2', '$game', '$mobname', '$info')";
$drop = "SELECT itemname FROM log_mitem ON mobname = '".$mobname."'";
if($dropres = $db->query($drop))
$items = $dropres->itemname;
$dropslq = "INSERT INTO log_drops(item, mobname, game, log_id, log_name)VALUES('$items', '$mobname', '$game', '$id', '$name')";