Hello All,
I am getting this error:
DBD::mysql::st execute failed: You have an error in your SQL syntax near
''user_id', 'sem1_acad_id', 'sem1_course_id', 'sem1_ver', 'Sem_1_Final')
VALUES (' at line 1 at flatten_er5.pl line 132, <DATA> line 136342.
in the trace log I see this:
Setting mysql_use_result to 0
<- prepare= DBI::st=HASH(0x1b7812c) at flatten_er5.pl line 130.
-> execute for DBD::mysql::st (DBI::st=HASH(0x1b7812c)~0x31ac984
'user_id' 'sem1_acad_id' 'sem1_course_id' 'sem1_ver' 'Sem_1_Final' '230839'
'8243' '1' '1.1' '94')
-> dbd_st_execute for 031ac978
Binding parameters: insert into kevin ('user_id', 'sem1_acad_id',
'sem1_course_id', 'sem1_ver', 'Sem_1_Final') VALUES ( '230839', '8243',
'1', '1.1', '94')
ERROR EVENT 1064 'You have an error in your SQL syntax near
''user_id', 'sem1_acad_id', 'sem1_course_id', 'sem1_ver', 'Sem_1_Final')
VALUES (' at line 1' on DBI::st=HASH(0x31ac984)
You have an error in your SQL syntax near ''user_id', 'sem1_acad_id',
'sem1_course_id', 'sem1_ver', 'Sem_1_Final') VALUES (' at line 1 error 1064
recorded: You have an error in your SQL syntax near ''user_id',
'sem1_acad_id', 'sem1_course_id', 'sem1_ver', 'Sem_1_Final') VALUES (' at
line 1
<- dbd_st_execute -2 rows
!! ERROR: 1064 'You have an error in your SQL syntax near ''user_id',
'sem1_acad_id', 'sem1_course_id', 'sem1_ver', 'Sem_1_Final') VALUES (' at
line 1'
<- execute= undef at flatten_er5.pl line 132.
-> prepare for DBD::mysql::db (DBI::db=HASH(0x1b7803c)~0x1b7806c
'insert into kevin (?, ?, ?, ?, ?) VALUES ( ?, ?, ?, ?, ?)')
New DBI::st (for DBD::mysql::st, parent=DBI::db=HASH(0x1b7806c), id=)
dbih_setup_handle(DBI::st=HASH(0x31ac9cc)=>DBI::st=HASH(0x1bd9964),
DBD::mysql::st, 31ac9d8, Null!)
dbih_make_com(DBI::db=HASH(0x1b7806c), DBD::mysql::st, 204)
So I am confused because it looks like my values are being plugged in at
the execute statement, but it always errors out. Here is the code:
$sql_01 = $dbh->prepare("insert into kevin (?, ?, ?, ?, ?) VALUES ( ?, ?,
?, ?, ?)");
$sql_01->execute($user_id, $field_sem_acad, $field_sem_crse,
$field_sem_ver, $new, $u_id, $a_id, $lvc, $ver, $sc);
Am i missing something really obvious?
Thanks,
Dan
Dan Huston
Decision Support Systems
Cisco Networking Academy Program
Cisco Systems
2375 E. Camelback Rd., Ste. 220
Phoenix, AZ 85016
Phone (602) 778-2730
Cell Phone (602) 300-6043
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php