Jump to content

Recommended Posts

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

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.

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

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.