If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Condition of display

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-11-09, 10:34
johngay johngay is offline
Registered User
 
Join Date: Apr 2009
Posts: 3
Condition of display

I'm an old fart trying to get into an area that is exciting and new. I appologise for not understanding the code and I am trying to learn. I have a program that does that for me. However I am trying to tweek what I have.

I have two sites using the same database. The main site has the tournament entry default to "Not Aproved" and I would like it to not show up on the list until admin approves it. On the admin site they can select "Not Approved;;Approved" and when it is approved I would like that file to appear in the main list view.

I think it is something like:
SELECT YouthTournamentEntry.Approval, from YouthTournamentEntry_table where YouthTournamentEntry.Approval = 'approved';

However I don't know how to put it into the Query or if it is in fact correct.

The code is below and I have a sample site at Your Page Title


The code for the viewing is:
// mm: build the query based on current member's permissions
if($perm[2]==3){ // view all
$x->Query = "select YouthTournamentEntry.youth_id as 'ID', YouthTournamentEntry.Date as 'Date', YouthTournamentEntry.Age as 'Age', YouthTournamentEntry.Class as 'Class', YouthTournamentEntry.Location as 'Location', YouthTournamentEntry.Website as 'Website', YouthTournamentEntry.Tournament_Name as 'Tournament Name', YouthTournamentEntry.Approval as 'Approval', YouthTournamentEntry.Format as 'Format', CONCAT('$', YouthTournamentEntry.Fee) as 'Fee', YouthTournamentEntry.Contact as 'Contact', YouthTournamentEntry.Email as 'Email', YouthTournamentEntry.Telephone as 'Telephone' from YouthTournamentEntry, membership_userrecords where YouthTournamentEntry.youth_id=membership_userrecor ds.pkValue and membership_userrecords.tableName='YouthTournamentE ntry' and membership_userrecords.memberID='".getLoggedMember ID()."'";


Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On