I know the following MySQL code is not correct can some help me fix this code to use both tables I'm trying to grab the id
from learned_skills
and skill_id
from users_skills
for AND skill_id = id
Here is the MySQL code.
SELECT learned_skills.*, users_skills.*
UPDATE learned_skills
SET skill = '$skill', experience = '$experience', years = '$years'
WHERE user_id = '$user_id'
AND skill_id = id
Here is the error I get
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE learned_skills SET skill = 'some_skill', experience = '1 - 2 years' at line 2