| Member with 1,006 posts. THREAD STARTER | | Join Date: Dec 2011 Location: Johannesburg South Africa Experience: Intermediate |
12-Jul-2012, 11:00 AM
#16 |
Ha-ha! I'm also glad!
Perhaps you might help me with a quick question - I'm setting up the db using the vehicles.dat file and hit a small prob...
can I use php data variables in the insert statement? Like this... PHP Code: mysql_select_db("surfwhee_vehicles", $con);
foreach ($vehicles["vehicles"] as $id => $vehicles)
{
$count+=1;
echo "Count: " . $count;
mysql_query("INSERT INTO webentry
(datetime, fullname, phone, cell, suburb, make, model, year, kms, colour, extras, servhist, accidents, settlement, finhouse, monthsrem, monthsarr, amtrem, price, comments, tprice, rprice, natis, pics4, wcdisc, aprice, status, notes, agent, datetimestamp)
VALUES
($vehicles['datetime'], $vehicles['fame'], $vehicles['phone'], $vehicles['cell'], $vehicles['suburb'], $vehicles['make'], $vehicles['model'], $vehicles['year'], $vehicles['kms'], $vehicles['colour'], $vehicles['extras'], $vehicles['servhist'], $vehicles['accidents'], $vehicles['settlement'], $vehicles['finhouse'], $vehicles['monthsrem'], $vehicles['monthsarr'], $vehicles['amtrem'], $vehicles['price'], $vehicles['comments'], $vehicles['tprice'], $vehicles['rprice'], $vehicles['natis'], $vehicles['pics4'], $vehicles['wcdisc'], $vehicles['aprice'], $vehicles['status'], $vehicles['notes'], 'Jim', date())");
}
mysql_close($con);
And yet another quessy...
I created the db using the server ControlPanel software (phpMyAdmin) and half expected to pick up the localhost MySql directory in FileZilla, but haven't. Is there any way that I can? (I would like to download it to xampp)
__________________ "I expect to pass through this world but once. Any good, therefore, that I can do or any kindness I can show to any fellow creature, let me do it now. Let me not defer or neglect it for I shall not pass this way again." |