candyclaire Posted September 10, 2007 Share Posted September 10, 2007 hello everyone, once again i need your opinions about this error that ive been receiving.. what could be the possible reason for PHP to produce this kind of error??? although i do have an answer to this but im not yet sure..so i i would like to ask for your opinions.. Warning: pg_exec(): Query failed: ERROR: invalid input syntax for integer "a" in... thank you very much.. Link to comment https://forums.phpfreaks.com/topic/68653-solved-pg_exec-query-failed/ Share on other sites More sharing options...
Fadion Posted September 10, 2007 Share Posted September 10, 2007 On the php manual for pg_query() This function used to be called pg_exec(). pg_exec() is still available for compatibility reasons, but users are encouraged to use the newer name Even if i know nothing about PostgreSQL and not sure i can help, u can post the query code for us to see the errors. Link to comment https://forums.phpfreaks.com/topic/68653-solved-pg_exec-query-failed/#findComment-345123 Share on other sites More sharing options...
candyclaire Posted September 10, 2007 Author Share Posted September 10, 2007 On the php manual for pg_query() This function used to be called pg_exec(). pg_exec() is still available for compatibility reasons, but users are encouraged to use the newer name Even if i know nothing about PostgreSQL and not sure i can help, u can post the query code for us to see the errors. okay here it is $sql = "insert into deta(DetOrderID,DetTenno,DetTag,DetItemID,DetItemName,DetArai,DetQuick,DetSim,"; $sql.= "DetAprice,DetTanka,DetDis,DetFinish,DetDiv,DetRes,DetDeli,DetOrderday,Detarea,DetSoz,DetSoz2,DetKak,DetKak2,DetSNo,DetSno2,DetKNo,DetKno2,Dkubun,DetCat)"; $sql.= " values ('$orderid','$Ctenno','$dettag[$i]','$detcode[$i]','$detname[$i]','$detarai[$i]',"; $sql.= "'$detqui[$i]','$detsim[$i]','$detaprice[$i]','$tanka','$disc','0','$detdiv[$i]',"; $sql.= "'$detres[$i]','0','$detoday','$detarea','$sozainame','$sozainame2','$kakouname','$kakouname2',$detsoz[$i],$detsoz2[$i],$detkak[$i],$detkak2[$i],'0','$detcat[$i]')"; $res = pg_Exec($cond,$sql); where detkak,detkak2,detsoz and detsoz2 are declared as integers in the database Link to comment https://forums.phpfreaks.com/topic/68653-solved-pg_exec-query-failed/#findComment-345203 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.