צריך רעיון לביצוע

gunfor

New member
צריך רעיון לביצוע

יש לי את הקוד הזה
function sets($menu) { global $out; switch ($menu) { case "main": include($root . 'includes/dbs.php' ); error_reporting (E_ERROR | E_WARNING | E_NOTCIE); $lk = mysql_connect($serv,$user,$pass) or die ("unable to do connection \n" .mysql_error()); mysql_select_db($dbname[0],$lk); $qur = "select * from linkssets where loc = 'main' order by id desc"; $res = mysql_query($qur) or die ("error in the select " .mysql_error()); while ($row = mysql_fetch_assoc($res)) { $out = array ( $row['desc'] => $row['name'] ); } return $out; close_db($lk,$res); } } function get_id($find) { $id = array(); include($root . 'includes/dbs.php' ); error_reporting (E_ERROR | E_WARNING | E_NOTCIE); $lk = mysql_connect($serv,$user,$pass) or die ("unable to do connection \n" .mysql_error()); mysql_select_db($dbname[0],$lk); $count = count($find) - 1; for ($i = 0 ;$i <= $count ; $i++) { foreach ($find as $kay => $val) { $qur = "SELECT id,desc,name FROM linkssets WHERE 1 AND desc = '" .$kay ."' AND name = '" .$val ."' ORDER BY id DESC"; } $res = mysql_query($qur) or die ("Not on the db"); $row = mysql_fetch_assoc($res); $id[] = 'index.php?id=' . $row['id']; } return $id; close_db($lk,$res); }​
מממ הבעיה היא איך אני פה יוכל לקבל את האיי די מין הממסד הנתונים ש אותו איי די יהיה תאום אם אותו פונקציה של המשיכת הנתונים (הסיבה שזה שני פונקציות בגלל שאני צריך באותו ממסד וטבלה את הנתונים שחל אותו שורה לפי סדר
 
למעלה