help me make a relation between 2 tables (php sql)
$10-30 USD
Terminado
Publicado hace casi 9 años
$10-30 USD
Pagado a la entrega
Im working on getting paypal payments into my website.
I have [login to view URL] from before and now payments.db.
In [login to view URL] i have a 'userId' and in [login to view URL] a 'id'
in my [login to view URL] i call [login to view URL] and have this code:
// PAYMENT VALIDATED & VERIFIED!
if($valid_txnid && $valid_price){
$orderid = updatePayments($data);
if($orderid){
// Payment has been made & successfully inserted into the Database
}else{
// Error inserting into DB
// E-mail admin or alert user
in [login to view URL] i have this code:
function updatePayments($data){
global $link;
if(is_array($data)){
$sql = mysql_query("INSERT INTO `payments` (txnid, payment_amount, payment_status, itemid, createdtime) VALUES (
'".$data['txn_id']."' ,
'".$data['payment_amount']."' ,
'".$data['payment_status']."' ,
'".$data['item_number']."' ,
'".date("Y-m-d H:i:s")."'
)", $link);
return mysql_insert_id($link);
}
}
What i need is the solution for this:
in my [login to view URL] update two cells with the value of item_number and date from [login to view URL]
i need the userId from [login to view URL] to be the id inserted into [login to view URL] so i can connect these two tables when i get the values from both.
i need this asap - like the next hour and i want the code to be sent on chat.
i can upload files etc
Hello sir,
Would you can just click on discuss button and start chat with me.. Kindly if you want high quality work then as soon as possible contact me. Please give me chance to prove myself.I am new on freelancer.com.I have 3 year experienced IT.
Thanks Regard’s
Shahid IT Engineer