php - MySQL - select in an insert -
this question has answer here:
- mysql insert select problem 1 answer
i want insert ids 1 table along post variables of form.
insert tickets (name,text,betreff,priority,statusid,date,user_id) values ( '".mysql_real_escape_string( $name )."', '".mysql_real_escape_string( $text )."', '".mysql_real_escape_string( $betreff )."', '".mysql_real_escape_string( $priority )."', '".mysql_real_escape_string( $statusid )."', now() (select id login) )";
that gets me error!
you have error in sql syntax; check manual corresponds mysql server version right syntax use near '(select id login))' @ line 10
any suggestions?
you missing where
clause, selecting multiple ids single insert
statement.
select id login <?>
Comments
Post a Comment