iam inserting the values into mysql by include "mysql.h".
now when anyone updated mysql table i need to execute some function.
is there anyway to handle this
thank u
sree
This is a discussion on regarding mysql within the C Programming forums, part of the General Programming Boards category; iam inserting the values into mysql by include "mysql.h". now when anyone updated mysql table i need to execute some ...
iam inserting the values into mysql by include "mysql.h".
now when anyone updated mysql table i need to execute some function.
is there anyway to handle this
thank u
sree
suppose iam having a table students;
iam having a recored
student name :sree
number:1241
marks:345
if anyone change the record suppose marks:345 to 400
once the updation of the table occur then i have to handle this in our c program and i have to update it to 400.
Almost sounds like you're talking about a trigger but that's on the database side of things, not your application.
[edit]Sounds like you want your application to detect outside changes to the database table? Continually polling/reading the table every so often doesn't sound like a good idea if the table has a large amount of data in it. Maybe a trigger in the database that detects inserts/updates on the table in question and then updates a second table setting a "Changed" flag to true or something. Your app could read this small table single-field every second and if it becomes true you do a reread of the original table and set the "Changed" flag back to false.[/edit]
Last edited by hk_mp5kpdw; 12-20-2007 at 05:53 AM.
I used to be an adventurer like you... then I took an arrow to the knee.