php - Can a SQL table have a symbolic link or alias? -


i have table called news , want add tutorials. rather create table called tutorials want use news table since structure exact same. possible rename table "posts", create sort of alias or symbolic link table called "news" can still queried?

i'm trying avoid having modify source code have lot of php files , modifying every file contains sql query slow , error prone.

i have looked sql aliases seem temporary things require me modify existing sql queries.

i running mysql on centos. have root access server.

a view solved problem. renamed news table posts created view following query.

create view news select * posts 

this created virtual table called news. content of exact same. added new rows posts , showed when ran query selecting row news.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -