Jump to content

Create views on fields?


t.bo

Recommended Posts

Hey all,

 

Currently I have 3 different websites that are administrated for 90% on their own. The other 10% are the user tables. I wanted to make sure the user can register 1 time for 3 websites and have one profile for the 3 websites. So I created views for 2 websites user tables. These are now linked to the tables of the first website. This way al that I wanted works...except for one thing.

In the user table there is one field called avatar. This field is responsible for the picture each user has. I want it to be possible to have all fields shared over the 3 websites except this field. This way the user can have different avatars for each website.

So basically my question is:

Can I create views for just one field? OR

Can I create a view for a table and exclude 1 field from that table to function on it's own?

 

Kind regards,

 

Thibaut

Link to comment
https://forums.phpfreaks.com/topic/191278-create-views-on-fields/
Share on other sites

That's great news. Thank you for your reply Mchl.

Now, at the moment I did a CREATE VIEW for the whole table. If I delete and recreate the one 'avatar' field in the 'slave' table, will this work? I mean is this the correct way to exclude one field from the view?

 

Kind regards,

 

thibaut

Well I already created a view for the whole table like this

CREATE VIEW lvn_users AS SELECT * FROM dbk_users

 

In the lvn_users table there is a field called 'avatar'. So my question is how do I exclude this field from the current view? Do I just drop the field and recreate it or do I need to drop the whole table 'lvn_users' and do something else?

 

greets

Ok I have tried this. However now ofc there is no avatar field anymore in the slave table.  I also cannot create a normal extra field 'Avatar'. That means the user cannot have an avatar in the slave site.

So I guess if you create a view for one or more fields, that counts for the whole table... :-(

 

 

Thanks tho for the help!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.