All my select queries seem to work fine. However, when I want to
write something to the database it doesn't actually write to the
database. If I type in this at the command line or through the mysql
Query Browser, the command will actually write to the database.
Here are the snipits of my code that are in question here:
sql_create_20(new_releases,
1, 5, // explained in the user manual
=09int, id,
=09string, source,
=09int, owner,=20
=09string, name,
=09string, announce,
=09string, infohash,
=09string, file_link,
=09int, category,
=09int, subcatagory,
=09string, language,
=09long int, size,
=09mysqlpp:

ate, added,
//=09enum, type,
=09string, type,
=09int, numfiles,
=09string, delete_reason,
=09string, nuke_reason,
//=09enum, deleted,
=09string, deleted,
=09int, strike,
=09mysqlpp:

ate, checked,
=09int, downloaded
)
int main(int argc, char *argv[]) {
=09int downloads=3D0;
....
=09new_releases updatedRow =3D mainRows;
=09new_releases origRow =3D mainRows;
=09
=09updatedRow.downloaded =3D downloads;
=09cout << "Original Row: " << origRow.downloaded << " Updated Row: " <<
updatedRow.downloaded <<"\nMax Downloads: " << downloads << endl;
=09//writeQuery.update(origRow, updatedRow);
=09//writeQuery.insert(updatedRow);
=09writeQuery.replace(updatedRow);
=09cout << "Write Query: " << writeQuery.preview() << endl<<flush;
=09ResNSel a =3D writeQuery.execute();
=09cout << a.success << " " << a.insert_id << " " << a.rows << " " <<
a.info << endl;
.....
return 0;
}
The output from this segment of code:
Original Row: 600 Updated Row: 6
Max Downloads: 6
Write Query: REPLACE INTO new_releases
(id,source,owner,name,announce,infohash,file_link, category,subcatagory,lang=
uage,size,added,type,numfiles,delete_reason,nuke_r eason,deleted,strike,chec=
ked,downloaded)
VALUES (33281,'bot',2,'Triple.Agente.CVCD.DVDrip.[www.TodoCVCD.com].mpg','h=
ttp://tracker.prq.to/announce','5f4f6da7e3bad30bad2ccb7f51629a8d5abb41d 1','=
http://thepiratebay.org/download.php...D.DVDrip.%5Bw=
ww.TodoCVCD.com%5D1.torrent',1,0,'Unknown',8174021 72,'2005-05-14','single',=
1,'','','no',1,'2005-05-14',6)
1 33281 2
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw