Dokładnie tak mam.
<!-- BEGIN manage_users -->
<td class="row1" width="33%" style="text-align: center;">{manage_users.WHO}
</td> <td width="67%" class="row2"><input type="checkbox" name="uid[{manage_users.ID}]"></td> <!-- END manage_users -->
A w kodzie php:
if ( !empty($_POST['uid']) ) {
$del_ids = implode(',', $_POST['uid']); {
$sql = "DELETE FROM " . USER_GROUP_COMMUNITY . " WHERE group_community_id = $id_grupy AND user_id IN ($del_ids)";
if ( !($res = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'jakis error', '', __LINE__, __FILE__, $sql);
}
else
{
message_die(GENERAL_ERROR, 'Pomyślnie usunięto użytkowników');
}
}
}
else
{
message_die(GENERAL_ERROR, 'Nie wybrales usera');
}
I teraz przy usuwaniu:
Kod
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'on)' at line 1
Jak echuję zmienną $del_ids, to wychodzi mi jakieś
ON. Co jest nie tak?