JamesXL1967 Posted May 23, 2009 Share Posted May 23, 2009 Hi Guys I am new to PHP and mysql and I wondered if anyone could explain this error : Call to undefined function: resource id #88() in mydomain/home/myfile.php on line 63 The code it relates to is as follows (line 63 highlighted) : $user_data = $db->query("SELECT user_hi, user_lo FROM " . DB_PREFIX . "users WHERE user_id='" . $session->value('user_id') . "'"); $sql_select_data = $db->query("SELECT a.item_id, a.name, a.price, a.currency, a.owner_id, a.item_hi, a.item_lo, LINE 63 >>> sqrt (((". $user_data($user_hi) ." - a.item_hi)*( ". $user_data($user_hi) . " -a.item_hi)) + ((".$user_data($user_lo)." - a.item_lo)*(".$user_data($user_lo)." - a.item_lo))) AS TDifference FROM " . DB_PREFIX . "items a " . $force_index . " " . $where_query . " GROUP BY a.item_id ORDER BY TDifference ASC LIMIT " . $start . ", " . $limit); } Any help with the above or if you can spot any other errors in the code would be appreciated. Many thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/159402-solved-please-help-error-message/ Share on other sites More sharing options...
wildteen88 Posted May 23, 2009 Share Posted May 23, 2009 Judging by your code I think $user_data($user_hi) should of been $user_data['user_hi'] and $user_data($user_lo) should of been $user_data['user_lo'] Quote Link to comment https://forums.phpfreaks.com/topic/159402-solved-please-help-error-message/#findComment-840818 Share on other sites More sharing options...
JamesXL1967 Posted May 23, 2009 Author Share Posted May 23, 2009 Many thanks for the prompt reply Wildteen I will give that a try. Quote Link to comment https://forums.phpfreaks.com/topic/159402-solved-please-help-error-message/#findComment-840827 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.