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
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 06:53 AM.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens