this is the code for the query
[php] $attribute = $this->attributes();
$sql_string = “INSERT INTO “.self::$table_name;
$sql_string .= " (” . join(”, ", array_keys($attribute)) . ") “;
$sql_string .= “VALUES (” . join(”, ", array_values($attribute)) . ") ";
$sql_string .= “; SELECT SCOPE_IDENTITY() AS ID”;
[/php]
this is what get’s echod
INSERT INTO users (id, username, password, first_name, last_name) VALUES (, TEST, TEST, TEST, TEST) ; SELECT SCOPE_IDENTITY() AS ID
why the join with array_values gives me this > (,TEST,TEST,TEST,TEST) insted of (TEST, TEST, TEST, TEST)
and array_keys works fine??