Interchange Developer Resource


[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

RE: [ic] Filtering through a MySQL Field



>
> On my results page I'd like to only show records which have been approved.
>
> Example:
> I have a table in my database called 'members'.  In this table is a field
> called 'member_approved'.  Default value is set to '0'.  When performing
> searches, I need my results page to only show records which are set to '1'
> in the 'member_approved' field.
>
> In my results page, I have tryed:
> [if item-data members member_approved=1 then]
>
> This does not work, any ideas?
>
> Jim

           [if type=data term="members::member_approved::[item-code]"]
            	Approved
            [else]
            	Not approved
            [/else]
            [/if]

Jim,

This assumes that your members table has a sku field that is the primary key
and identical to your products table.

The foundation demo has a members functionality built in that you might find
helpfull.  Look for this code in the demo.

[if scratch members_only]
    [set members_only][/set]
	[snip for clarity........]
    [/if]
[/if]






_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: