php - insert data from select query -
I am trying to insert data from existing variable and selected column from second column
here Code is
$ JobTit = $ _ POST ['Jobbill']; $ Jobdescription = $ _ Post ['jobdescription']; $ Requirements = $ _ post [requirements']; $ Resume = $ _ post ['resume']; $ Expyears = $ _ Post ['expyears']; $ Submit = $ _ post ['submit']; $ Useremail = $ _ session ['email']; $ Insert = mysql_query ("Job Title, Job Description, Requirements, Expansion, Resume, Use Mail, Rispem) Prices ('$ Jobbill', '$ Job Details', '$ Requirements', '$ expyears' '$ Resume', '$ Useremail', select resname from restaurant to WHERE useremail = '$ useremail'));
But the above code does not return any results in my database < / P>
Is there a solution to this problem?
thanks
Because it is a excluded library Think about going to mysqli _ *
or PDO.
After saying this, your query is incorrect. You can see the VALUES ()
and INSERT < / Code> can not use a selection in the statement. Instead, you should select the string literal that you are trying to insert with a value that you want to select.
Instead try the following:
$ query = "Career Jobs (Jobbettlement, Job Description, Requirements, A Select 'Jobitil', '$ Job Details', '$ Requirements', '$ Experiences', '$ Resume', '$ useremail', Resname Restaurant, Select Resume, Spears, Resume, UsraRemail, Risanem From WHERE useremail = '$ useremail' ";
Comments
Post a Comment