Posted by Binny V A on Sat 21 Mar 17:18
report abuse | download | new post
- /**
- * @author hussein
- * @copyright 2009
- */
- //$args = array("table" => array("field1", "field2", "field3"));
- "table3" => "field",
- "table4" => "field",
- "table6" => "field2",
- "table7" => "field",
- "table8" => "field");
- //$args = "not array";
- //echo count($args);
- function s($vars, $where=''){
- $where = " WHERE ".$where;
- }
- foreach($vars as $table => $fields){
- $t_arr[] = $table." AS ".$t;
- foreach($fields as $field){
- $f_arr[] .= $t.".".$field;
- }
- $x++;
- continue;
- }
- $f_arr[] = $t.".".$fields;
- $x++;
- }
- return $qry = "SELECT ".$f_str." FROM ".$t_str.$where;
- }
- foreach($vars as $table => $fields){
- $qry = "SELECT ".$fields." FROM ".$table.$where;
- }
- $qry = "SELECT ".$fields_str." FROM ".$table.$where;
- }
- }
- }else{
- $qry = "An undefined error occured!";
- }
- return $qry;
- }else{
- $error = "Is not an array!";
- return $error;
- }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.