error cod Mysql select
Posted: Tue Jun 24, 2008 9:29 am
my cod is
were sectia_ai and user are 2 tables and sectia_ai has 3 fieds : url , semestru , s_id
user has 2 fields : username , s_id
when i try to insert into the database :
opt_alese is also a table where i want to insert username , url and semestru
it inserts only url and username.
pls explain to me way does insert only url and username .... and semestru doesn't

Code: Select all
$query= "SELECT sectia_ai.url,sectia_ai.semestru , user.username "." FROM sectia_ai, user "." WHERE sectia_ai.s_id = user.s_id ";user has 2 fields : username , s_id
when i try to insert into the database :
Code: Select all
$query = "insert into opt_alese (username ,url,semestru) values
('$username', '$url','$semestru')";it inserts only url and username.
pls explain to me way does insert only url and username .... and semestru doesn't