Hi,
I am using a custom "where" clause to load a db record based on user_id. I would like to include a value passed from the url in the "where" clause as well. At the moment my "where" clause looks like this:
If the URL includes "...token=1" I would like to include that in the "where" clause as well to check against another field in the database (say one called record_type). In other words I want my "where" clause to finish up reading;
Token is obviously replaced with the value passed in the URL when the form is run.
Is this possible?
Thanks in advance.
Nick
I am using a custom "where" clause to load a db record based on user_id. I would like to include a value passed from the url in the "where" clause as well. At the moment my "where" clause looks like this:
<?php
$user =& JFactory::getUser();
echo "`cf_user_id` = '{$user->id}'";
?>
If the URL includes "...token=1" I would like to include that in the "where" clause as well to check against another field in the database (say one called record_type). In other words I want my "where" clause to finish up reading;
`cf_user_id` = '{$user->id}' and 'record_type' = 'token'.
Token is obviously replaced with the value passed in the URL when the form is run.
Is this possible?
Thanks in advance.
Nick