Skip to content

Commit fa9f5ce

Browse files
author
filippelli
committed
Correction of mysql_insert_id
the command mysql_insert_id was related to the lastest database connection not to the object related one.
1 parent dcede6a commit fa9f5ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

class.MySQL.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class MySQL {
2424

2525
// Base variables
26-
public $lastError; // Holds the last error
26+
public $lastError; // Holds the last error
2727
public $lastQuery; // Holds the last query
2828
public $result; // Holds the MySQL query result
2929
public $records; // Holds the total number of records returned
@@ -380,7 +380,7 @@ public function arrayResultsWithKey($key='id'){
380380

381381
// Returns last insert ID
382382
public function lastInsertID(){
383-
return mysql_insert_id();
383+
return mysql_insert_id($this->databaseLink);
384384
}
385385

386386
// Return number of rows

0 commit comments

Comments
 (0)