Return a reference to column names
$name = $sth->{NAME};
Number of affected rows
$sth->rows();
New auto-incremented id
$latestId = $dbh->{‘mysql_insertid’}
Uploading large data. ‘INSERT INTO’ command takes long amount of time. Use ‘LOAD DATA’ command to upload bulk data from a text file.
- Be careful. If the file to be uploaded resides on the server, it still needs to be accessible by the mysql server. E.g. you can place them under /tmp
- You can specify NULL characters by ‘\N’, e.g. “9,\N,276,John…”