You could not use referential integrety on the db (quick fix).
But that is not something to recommend.
Otherwise you could create a default user: 'Deleted user' and before you
remove the user set the article to this user.
A third way is to keep the user but flag it as deleted instead of actually
deleting
the user
Robert Klinkenberg
> -----Oorspronkelijk bericht-----
> Van: RSalomo [SMTP:[EMAIL PROTECTED]]
> Verzonden: Wednesday, August 15, 2001 11:21 AM
> Aan: [EMAIL PROTECTED]
> Onderwerp: [PHP-DB] delete user but keep the article
>
> hi,
>
> i have a news article database that input by users, for example
> articlename:
> 'abc', input by username: 'user_x'.
>
> i want to delete user_x, but keep article abc.
> how php/mysql display that there is article named 'abc', input by
> 'user_x',
> but there are no further information about that user (except maybe only
> his
> firstname) because user_x no longer exists.
>
> how can i do this?
>
> thanks
>
> rudy.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]