Jump to content

Warning in Insert Data To DB


msafvati

Recommended Posts

hi

i have a problem!!!

when i insert Data To DB PHP Compiler Show me a warning.

please guide me for this warning

 

Warning: odbc_do() [function.odbc-do]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in E:\MAS\Prj2\Local path\MASRegCod\MASReg.php on line 119

 

Script is :

<?php
$connectionstring = odbc_connect("User", "", ""); 
$query ="insert into tblReguser values(";
$query = $query."'".$_GET['txt1']."',"; 
$query = $query."'".$_GET['txt2']."',"; 
$query = $query."'".$_GET['txt3']."',"; 
$query = $query."'".$_GET['txt4']."',"; 
$query = $query."'".$_GET['txt5']."',"; 
$query = $query."'".$_GET['txt6']."',";
$query = $query."'".$_GET['txt7']."',";
$query = $query."'".$_GET['txt8']."',";
$query = $query."'".$_GET['txt9']."',";
$query = $query."'".$_GET['txt10']."',"; 
$query = $query."'".$_GET['txt11']."',";
$query = $query."'".$_GET['txt12']."',";
$query = $query."'".$_GET['txt13']."',";
$query = $query."'".$_GET['txt14']."',)";
#echo  $query;

$result = odbc_do($connectionstring, $query);
if ($Result == 1)
echo "ÔãÇ ÈÇ ãæÝÞíÊ ÏÑ ÓíÓÊã ßÇÑíÇÈí ßÔæÑí ËÈÊ ÔÏíÏ " ;
odbc_close($connectionstring); 
?>

line 119 : $result = odbc_do($connectionstring, $query);

Thank you..

Link to comment
https://forums.phpfreaks.com/topic/91829-warning-in-insert-data-to-db/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.