i first use adodb,
i want to use it to insert some data into mysql
,i read some reference book,in docs-adodb.htm,it told me follow:
$sql = "SELECT * FROM ADOXYZ WHERE id = -1";
Select an empty record from the database
$conn = &ADONewConnection("mysql"); # create a connection
$conn->debug=1;
$conn->PConnect("localhost", "admin", "", "test"); # connect to MySQL, testdb
$rs = $conn->Execute($sql); # Execute the query and get the empty recordset
$record = array(); # Initialize an array to hold the record data to insert
Set the values for the fields in the record
Note that field names are case-insensitive
$record["firstname"] = "Bob";
$record["lastNamE"] = "Smith";
$record["creaTed"] = time();
Pass the empty recordset and the array containing the data to insert
into the GetInsertSQL function. The function will process the data and return
a fully formatted insert sql statement.
$insertSQL = $conn->GetInsertSQL($rs, $record);
$conn->Execute($insertSQL); # Insert the record into the database
i don't know why it is to execute "select " sentence before "insert"