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
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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

 

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.