Jump to content

How to check whether a row is inserted into the DB?


Stefany93

Recommended Posts

Hello friends,

 

I want to check when a new row is inserted into the mysql DB, but the problem is that since I insert the rows manualy because they are blog posts, the mysql_insert_id doesn't work, and I would very much like to check that because I would like a mail to be send after that action.

 

Please tell me how to check when a row is inserted.

 

Thank you!

 

Best Regards

Stefany

Link to comment
Share on other sites

Because I want the system to automatically send an email to all the subsdcribers to the blog. Or am I doing everyrhinf wron? Sorry, sometimes I do everything so messed up  :'(

 

So why are you manually entering the database information. If you're going as far as having subscribers and want to send out mass e-mails on updates, why not create a front-end to update the blog, and have it send the e-mails.

Link to comment
Share on other sites

Because with the front end I will have to create an admin panel and everything the admin panel does I can do it myself. I have heard that admin panels are made only for people do not know how to program.

I mean, I can do everything just manually typing the blog post and title and stuff.

 

And to answer the upper question, I am not using wordpress, I have made the blog myself.

Link to comment
Share on other sites

I have heard that admin panels are made only for people do not know how to program.

I mean, I can do everything just manually typing the blog post and title and stuff.

 

Then do it that way, I suppose?

 

Or write a CLI-based script that accepts a flag/argument containing the row's ID and e-mails all your subscribers? Run this script after you've added a post, manually giving it the post's unique ID.

 

I'm not sure if you can create a MySQL trigger that will run an outside application, that might be worth looking into as well.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.