note 911 modified in odbc_execute by ronabop

From: Date: Fri, 20 Oct 2000 06:08:50 +0000
Subject: note 911 modified in odbc_execute by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-6738@lists.php.net to get a copy of this message
For a simple database insert to a database that has no password and $from and $to are predefined variables. /* get connection */ $conn=odbc_connect("mydb","",""); /* run insert */ $stmt = odbc_prepare($conn, "INSERT INTO mytable (jor_from, jor_to) VALUES('$from', '$to');" ); /* check for errors */ if (!odbc_execute($stmt)) { /* error */ echo "Whoops"; } /* close connection */ odbc_close($conn); http://www.php.net/manual/function.odbc-execute.php

« previous php.notes (#6738) next »