Así:
Código:
$usuario = $_SESSION['id'];
$consulta_previa = mysql_query("SELECT * FROM keeps WHERE iduser='$usuario'");
$id_links_robados = '';
while($registro_previo = mysql_fetch_array($consulta_previa)){
$id_links_robados .= "'".$registro_previo["idlink"]."', ";
}
$id_links_robados = substr($id_links_robados,0,-3);
echo $id_links_robados;
$sql = '';
$sql = "SELECT * FROM links WHERE id IN ( '$id_links_robados' ) OR iduser='$usuario'";
Tampoco
EDIT,
lo raro es que así tampoco:
[/QUOTE]$sql = "SELECT * FROM links WHERE id IN ( $id_links_robados )";[/QUOTE]
que le he puesto un echo y me devuelve:
[QUOTE]SELECT * FROM links WHERE id IN ( '132', '145', '439', '422', '355', '466', '465', '427', '467', '421', '463', '0', '468', '83', '473', '476', '474', '75', '490', '22', '472', '493', '609', '66356', '66363', '66370', '66375', '66405', '66402', '66389', '66412', '66413', '21', '66420', '628', '66417', '66415', '66414', '291', '67163', '67169', '67174', '67177', '495', '67178', '67179', '67184', '67206', '67211', '67219', '67221', '545', '67231', '67235', '67236', '141', '67245', '67312', '67313', '67339', '67444', '67443', '67520', '67626', '67645', '67644', '67644', '67642', '67644', '67683', '67695', '67701', '67682', '390', '430', '4', '37', '67669', '67709', '67713', '67716', '0', '67753', '67738', '67349', '67161', '67816', '0', '67818', '67853', '67880', '67894', '67910', '67902', '67911', '67913', '67640', '169', '66336', '67213', '67893', '67397', '67921', '5', '67931', '67933', '67922', '67946' )[QUOTE]