---------------------------------- foud by: Breeeeh Site: http://www.alshmokh.com Email: Breeeeh@hotmail.com ---------------------------------- $query = $db->query("SELECT pid FROM ".TABLE_PREFIX."posts WHERE tid='$tid' $visible ORDER BY dateline LIMIT $start, $perpage"); while($getid = $db->fetch_array($query)) { $pids .= "$comma'$getid[pid]'"; $comma = ","; } ------------------- example: /showthread.php?...$comma=[SQL]