I want update the Postgres database table with array elements but I didn't know how.
I tried this but I got this notice: Notice: Undefined index: 'value' in 'file' on line x
Update:
private function debug ($function_name, $arg_names, $arg_vals (<=with func_get_args()) )
{
$arg_names_array = explode(',', $arg_names);
foreach($arg_names_array as $k => $v)
{
$v = trim($v);
$v = pg_escape_string($v);
$vars[$k] = $arg_vals[$v];
}
$this->return_ = $vars;
return $this->return_;
}
pg_query($connect, "UPDATE tabe SET row = {$vars[$first]} WHERE code = {$vars[$code]} ");
pg_query($connect, "UPDATE tabe SET row = '{$vars[$first]}' WHERE code = '{$vars[$code]}' ");