You are here: Re: Simple Logic Question « PHP Programming Language « IT news, forums, messages
Re: Simple Logic Question

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация