|
Posted by Jerry Stuckle on 08/27/07 12:03
Matt wrote:
> On Aug 27, 1:45 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>
>> IF they aren't authorized, they won't get the article, even if they
>> guess the URL.
>
> This is the part I'm having trouble with. Norman's method will work
> fine to print a list of links to articles depending on user access
> rights, but my issue is for displaying a specific article. I just
> can't figure out an efficient way to test a) if the article IS premium
> and b) if the user is premium without repeating my 'output article'
> code.
>
> I can't build my SELECT statement based on privileges because I have
> to make the SELECT in the first place to establish whether or not the
> article is premium content or not!
>
If you can retrieve whether the article is premium or not, SQL can test
on it. Just make it a part of your SELECT statement - if they are not a
premium user, ensure it's not a premium article.
For details on the SQL itself, try posting in comp.databases.mysql -
you'll need to post your table layout and some sample data so people can
help you.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|