I'm running this code with no errors but it's not inserting the string
into the database ?
public void addInfo( String referer )
throws SQLException, Exception {
if (con != null) {
try{
PreparedStatement updateInfo;
updateInfo = con.prepareStatement(
"insert into info(?)");
updateInfo.setString(1, referer )
updateInfo.execute();
}
catch (SQLException sqle){
sqle.printStackTrace();
}
}
else {
error = "Connection with database was lost.";
throw new Exception( error );
}
}
This is my database
mysql> desc info;
+---------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-----------+------+-----+---------+-------+
| ID | int(11) | | PRI | 0 | |
| REFERER | char(200) | YES | | NULL | |
+---------+-----------+------+-----+---------+-------+
2 rows in set (0.00 sec)
Any Idea why nothing is showing up. Referer is a String its printing out
on the page but not updating the database?
Thanks anyone
-wiley
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]