Field Checkbox (Multi-Value) Question.
3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 18, 2013 (RSS)
Hi, I have a question reguarding writing a select for the checkbox (mulit Value)
I wanted to limit the select to records in another table to those that they created. Here is my query so far: SELECT website FROM cms_websites WHERE createdByUserNum = (Need to know what to put here)
By Dave - November 18, 2013
Hi jsammann,
Try this:
SELECT website FROM <?php echo $TABLE_PREFIX ?>websites WHERE createdByUserNum = "<?php echo @$CURRENT_USER['num']; ?>"
Also, you don't need $TABLE_PREFIX, but it makes your code a bit more portable if you move it to another server with a different table_prefix besides cms_.
Let me know if that works for you.
interactivetools.com