Jump to content

Recommended Posts

ok so I had this database of 20,000 items. My part numbers I had to add a gg in front of all them then add them into the same database. So I had the old part numbers that looked like this 33344 and new part numbers that looked like this gg33344. Now for some reason it is only totaling up the old numbers and not the new numbers. The same exact query with a recently new database was built and seems to have no issue with the letters being in front. So my guess is that if you insert new items into database you have to readd the event? Anyone have any ideas or input?

 

example of new database after query ran for total  my query is something like this total = (stock ny+ stock nc )

 

part number  - stock ny - stock nc - total

33344               5              6            11

gg33344           5              6            0

34344               5              6            11

gg34344           5              6            0

36344               5              6            11

gg36344           5              6           0

 

 

thanks

Wow thats exactly what it was. Turns out whenever you add more rows of data you have to go in and delete the old event then add it again. I am using 5.1 something i believe. Is this a bug or is this how mysql events are suppose to be ?

Wow thats exactly what it was. Turns out whenever you add more rows of data you have to go in and delete the old event then add it again. I am using 5.1 something i believe. Is this a bug or is this how mysql events are suppose to be ?

No, you do not have to re-add events for them to see newly inserted data. You re-adding the event probably just resolved some other issue such as the event maybe being disabled, or the event's query not being what you thought it was.

Its the same exact query that I am sure of. Its 5.1.73

 

For some reason when I added another 20,000 items it never queried everything. Only the old stuff. So I deleted the even then readded it. Any suggestions or ideas where to look or what to do besides upgrading mysql?

 

Thanks

Since re-creating the event, have you re-tested adding new rows and seeing if the event will then see them (without being re-created again)?

 

I've not yet used the event system but prior to posting I did test it on my server by creating an event which periodically updated a table with the count of rows matching a pattern in another table, then I periodically added new rows both matching and non-matching and the count properly updated each time the event ran with the new information.

 

What exactly does your event do and how is it defined? Are you sure it's even being run after the rows were added?

Well that still doesn't explain why it only queried half of the items. Because it did keep on querying.But on the old stuff..So that one I have yet to figure out. It works now and I am happy. Is there any log anywhere that might say? thank you

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.