listValues function


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function listValues($tbl='',$sql='', $velden='*') {
  2. dbConnect();
  3. $result=mysql_query("select $velden from $tbl $sql");
  4. //echo "select $velden from $tbl $sql";
  5. $x=0;
  6. while($row=mysql_fetch_array($result)) {
  7. for($j=0;$j<mysql_num_fields($result);$j++) {
  8. $name = mysql_field_name($result, $j);
  9. $list[$x][$name]=$row[$name];
  10. }
  11. $x++;
  12. }
  13. return $list;
  14. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.