c_shelswell Posted April 10, 2007 Share Posted April 10, 2007 Ok further to my previous query re connecting to a db with delete privileges i'm now trying to connect to the database as a different user to carry out this php function. It does however not seem to be carrying out the mysql request with the logon provided. my db logon is: function db_connect_pp(){ $result = mysql_pconnect('localhost', 'smvideouserdel', 'smd31u53r'); if (!$result) return false; if (!mysql_select_db('simpleminds_dlc')) return false; return $result; } then i have the query which should (i thought) call that logon script and execute my queries with a user with delete privileges though it's not happening. The below is my php function: function paymentVerified($orderNum, $userEmail, $txnid, $method) { $conn = db_connect_pp(); $delQ = "delete from purchases_pending where download_id='$d[0]'"; $delRes = mysql_query($delQ); (shortened version but that's the important stuff) there will have been other connects to the db with a username that cannot delete before this is called could this be the problem? that it's just trying to do it under that user? Thanks for any suggestions. Quote Link to comment Share on other sites More sharing options...
c_shelswell Posted April 11, 2007 Author Share Posted April 11, 2007 sorry anyone got any ideas? :bump: Quote Link to comment Share on other sites More sharing options...
rpadilla Posted April 11, 2007 Share Posted April 11, 2007 from php.net mysql_query ( string query [, resource link_identifier]) try $delRes = mysql_query($delQ, $conn); Quote Link to comment Share on other sites More sharing options...
c_shelswell Posted April 11, 2007 Author Share Posted April 11, 2007 great that seems to have worked. Thanks very much indeed Quote Link to comment 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.