I need to call the amember "members" table to read a value. I noticed in the last page of the manual there is this line: Why is it not recommended? Is there a security risk? I added a row to the table called " up_sms_status" that I need to query for a specific user. I'm doing this in one of my protect folders outside of amember but i'd like to use the same method amember uses to connect. For example. (And I'm sure there is something wrong here). I included the amember config file with: include ('../subscribe/config.inc.php'); function test($myid){ global $db; $status = $db->query($sql = "SELECT up_sms_status FROM {$db->config[prefix]}members WHERE login = $myid"); return $status; } $myStatus = test(7); echo ($myStatus); But I get an error that says "Resource id #64" Can someone explain what is wrong here and why this is not a good idea. Thanks Fish ><>
There is nothing regarding aMember, it is a code problem, have a look: PHP: function test($myid){global $db;$q = $db->query($sql = "SELECT up_sms_statusFROM {$db->config[prefix]}membersWHERE login = $myid");list($status) = mysql_fetch_row($q);return $status;}$myStatus = test(7);echo ($myStatus);