--- a/Seafood/populateDB/main.cpp Thu Mar 25 16:50:03 2010 -0700
+++ b/Seafood/populateDB/main.cpp Fri Mar 26 15:19:41 2010 -0700
@@ -56,8 +56,8 @@
QSqlQuery query;
- query.prepare("INSERT INTO ecoDetails (lastID, details) VALUES (:lastID,:details) ");
- query.bindValue(":lastID", lastID);
+ query.prepare("INSERT INTO ecoDetails (fid, details) VALUES (:fid,:details) ");
+ query.bindValue(":fid", lastID);
query.bindValue(":details",details);
if (!query.exec())
{
@@ -86,7 +86,7 @@
qDebug() << "DB: database opened " << endl;
createTable("create table fish "
- "(lastID integer primary key, "
+ "(fid integer primary key, "
"name varchar(32),"
"category int,"
"calories int,"
@@ -97,7 +97,7 @@
"sodium int)");
createTable ("create table ecoDetails (eid integer primary key, "
- "lastID integer, "
+ "fid integer, "
"details varchar(128))");
int lastID = -1;