Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
bu33ing
Starting Member
1 Post |
Posted - 2008-12-10 : 09:16:07
|
| This is driving me NUTZ ----SQL Server 2005 and PHPthe variable :t_id is being passed from other pages and works in other statements, but is not parsing within this statement. If I replace :t_id with say 30, it works just fine. I tried declaring a new variable and passing it to the statement, and get the same error.define("TF_T_INFO_INSERET", "insert into TFT (WG_ID,task_id,tf_id)SELECT (select WGID from LU_T where TID= :t_id ), :t_id , (select max(TF_ID) from LU_TF);");------------output --------------Performing an upload: insert into TFT (WG_ID,task_id,tf_id) SELECT (select WGID from LU_T where TID= :t_id ),:t_id ,(select max(TF_ID) from LU_T); Binding value :t_id to 30------ ERROR ---An error was encountered while saving: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error (SQLExecute[0] at ext\pdo_odbc\odbc_stmt.c:133)----------------ThanksB |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-10 : 09:22:52
|
| may be this"insert into TFT (WG_ID,task_id,tf_id)SELECT (select WGID from LU_T where TID=" + :t_id +"),"+ :t_id +', (select max(TF_ID) from LU_TF);"); |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|
|
|