Modif des bookmark pour eviter les doublons
This commit is contained in:
parent
6675bf1d54
commit
ff9f6711a9
@ -46,10 +46,16 @@ $db = new Db();
|
|||||||
|
|
||||||
if ($action == 'add_bookmark')
|
if ($action == 'add_bookmark')
|
||||||
{
|
{
|
||||||
|
$sql = "DELETE FROM llx_bookmark WHERE fk_soc = ".$socidp." AND fk_user=".$user->id;
|
||||||
|
if (! $db->query($sql) )
|
||||||
|
{
|
||||||
|
print $db->error();
|
||||||
|
}
|
||||||
$sql = "INSERT INTO llx_bookmark (fk_soc, dateb, fk_user) VALUES ($socidp, now(),".$user->id.");";
|
$sql = "INSERT INTO llx_bookmark (fk_soc, dateb, fk_user) VALUES ($socidp, now(),".$user->id.");";
|
||||||
if (! $db->query($sql) ) {
|
if (! $db->query($sql) )
|
||||||
print $db->error();
|
{
|
||||||
}
|
print $db->error();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'del_bookmark')
|
if ($action == 'del_bookmark')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user