Jump to content

[SOLVED] Trouble Calling From Database


refiking

Recommended Posts

Here is the other insert code:

 

$store = "INSERT INTO Records(analyst_id , record_id , b_first_name , b_last_name , c_first_name ,

c_last_name , address, city , state , zip , loan_amount , rate , cap , mo_pay , new_rate , new_mopay ,

pay_change , change_date , ltv , lender , telephone , ipaddy , timestamp)

VALUES('$analyst_id','$record_id','$bfn','$name','$cfn','$cln','$add','$city','$state','$zip','$la','$iir',

'$adjc','$mpay','$nr','$nmpay','$change','$cpdate','$ltv','$lender','$tel','$ipaddy','$dun')";

 

You've got a lot of fields there!

 

Can you check in the `Records` table and check if the records ma123, ma124, and ma125 aren't already there? That could be one reason why the INSERT query is failing. I've had problems with inserting before where I've not been specifying enough fields but I think it depends on how the table is set up but I really am not sure.

Got it working now!  Here's what I did:

 

$que = mysql_query("SELECT `analyst_id` FROM `Analysts` WHERE username = '$username'");

while($row = mysql_fetch_assoc($que)){

$analyst_id = $row['analyst_id'];

echo $analyst_id;

}

 

Then, I did this:

 

$store = "INSERT INTO Records(analyst_id , record_id , b_first_name , b_last_name , c_first_name ,

c_last_name , address, city , state , zip , loan_amount , rate , cap , mo_pay , new_rate , new_mopay ,

pay_change , change_date , ltv , lender , telephone , ipaddy , timestamp)

VALUES('$analyst_id','$record_id','$bfn','$name','$cfn','$cln','$add','$city','$state','$zip','$la','$iir',

'$adjc','$mpay','$nr','$nmpay','$change','$cpdate','$ltv','$lender','$tel','$ipaddy','$dun')";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.