Hi,
I am trying to write below INSERT sql statement to insert a row of data.
I check the mySQL table, the data is not being inserted and there is no error shown. However, the INSERT statement works fine when I manually input through the mySQL command line.
** NOTES:
- I am using PHP 5.2.6, mySQL 5, Ms. IIS Web Server, and MySQL ODBC 5.1 driver.
- I tried on odbc_exec and odbc_execute but both does not work
<?php
$conn=odbc_connect('myDSN','root','password');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="INSERT INTO user_profile (user_id, fname, lname) VALUES ('LISA', 'LISA', 'SIMPSON')";
echo $sql;
$rs=odbc_exec($conn,$sql);
odbc_close($conn);
?>
Could anyone help please, thanks a lot.
/.. Wayne.