getting specific data from wordpress database table
-
I am trying to use WordPress logged in user id which should search transaction_user_ID in the table wp_m_subscription_transaction.
The table has a column called transaction_user_ID and another called transaction_paypal_ID.
logic:if user id == transaction user id then get transaction paypal id
which should be passed to the url along with the user id email address and the execute the url to get the a code – this is my final output
How this can be achieved?
The code which I am developing is like this which is obviously incomplete & error for the getting and using the database query
<?php $user_id = get_current_user_id(); $query = "SELECT * FROM $wpdb->;wp_m_subscription_transaction if ($user_id ==$query) { <a href="http://primary.copyminder.com/cm_prodkey.php?DID=********&Password=*****&ProdCode=*******&NumRequired=1&TransNum=(GET THIS FROM DATABASE) &CustEmail=". $current_user->user_email .">Get ur Code</a> } else { echo 'You are not logged in as user ';}?>
- The topic ‘getting specific data from wordpress database table’ is closed to new replies.