MySQL Forums
Forum List  »  PHP

Re: Update column when datetime = NOW()
Posted by: Trevor Pan
Date: February 22, 2020 03:59PM

Hi Peter,

Appreciate the clarification.

I've found a particularly good post on MySQL Views and Laravel.
https://stitcher.io/blog/eloquent-mysql-views

This post states that views can not be updated, If I'm understanding them now, essentially they are snapshots of various columns in the database used for quick display of data - rather than re-querying the database.

Are you aware of a technique for using MySQL views that when posts are created the MySQL view updates and adds the new records?

e.g. the Algolia search index is updated each time a record is persisted via a method called toSearchableArray(). However, if we put the method on a view those new records will not be sent to Algolia after the original view is created.

https://www.algolia.com/doc/framework-integration/laravel/indexing/configure-searchable-data/?language=php

Options: ReplyQuote


Subject
Written By
Posted
Re: Update column when datetime = NOW()
February 22, 2020 03:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.