php - Error adding line in mysql with correct syntax -
i've looked @ several answers none solving problem.
i want insert several lines table , using following code:
insert teams
(id,'name'
,'password'
) values(2,'aston villa'
,'aston villa'
);
column types are: int,varchar,varchar
but keep getting following error:
"#1054 - unknown column '2' in 'field list'"
also if want hash password inline believe still receiving same error
insert `teams`(id, `name`, `password`) values (`2`,`aston villa`,sha256(`".$astonvilla."`));
make sure wrapping values properly:
$insert = printf("insert teams(`id`, `name`, `password`) values (2,'aston villa',sha256('%s'));", $astonvilla);