Updating a value usins MsAccess db?

From: Date: Thu, 10 Jan 2002 22:41:15 +0000
Subject: Updating a value usins MsAccess db?
Groups: php.db 
Request: Send a blank email to php-db+get-15643@lists.php.net to get a copy of this message
I was just wondering if anybody knew how to update values using an access db? (using odbc_exec()?). I have it all setup to display the results, just cant seem to update it, I always get errors. Heres my code: if($da != 0) { $cnx = odbc_connect( 'a' , $u, $p ); if( ! $cnx ) { echo "Error in odbc connect"; } $cur= odbc_exec( $cnx, "UPDATE weekno SET Date=$da" ); if( ! $cur ) { echo "Couldnt return curser"; } odbc_close( $cnx); $dat = $da; } I get Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement., SQL state 37000 in SQLExecDirect in c:\inetpub\wwwroot\dbtest.php on line 19 thanks --tom

« previous php.db (#15643) next »