Skip to main content
added 125 characters in body
Source Link
Rarst
  • 100k
  • 10
  • 161
  • 298

There is no explicit methodWP 4. It stores link identifier in5 had introduced $wpdbwpdb->dbh>close() field, so I guess you could use mysql_close() on itmethod to close connection in current instance.

 

Why do you need it btw? If you want to reuse $wpdb it is better to create separate wpdb object instead.Old answer

There is no explicit method. It stores link identifier in $wpdb->dbh field, but it is protected, so not convenient to run close on.

There is no explicit method. It stores link identifier in $wpdb->dbh field, so I guess you could use mysql_close() on it.

Why do you need it btw? If you want to reuse $wpdb it is better to create separate wpdb object instead.

WP 4.5 had introduced wpdb->close() method to close connection in current instance.

 

Old answer

There is no explicit method. It stores link identifier in $wpdb->dbh field, but it is protected, so not convenient to run close on.

added 53 characters in body
Source Link
jgraup
  • 9.8k
  • 3
  • 32
  • 68

There is no explicit method. It stores link identifier in $wpdb->dbh field, so I guess you could use mysql_close()mysql_close() on it.

Why do you need it btw? If you want to reuse $wpdb it is better to create separate wpdb object instead.

There is no explicit method. It stores link identifier in $wpdb->dbh field, so I guess you could use mysql_close() on it.

Why do you need it btw? If you want to reuse $wpdb it is better to create separate wpdb object instead.

There is no explicit method. It stores link identifier in $wpdb->dbh field, so I guess you could use mysql_close() on it.

Why do you need it btw? If you want to reuse $wpdb it is better to create separate wpdb object instead.

Source Link
Rarst
  • 100k
  • 10
  • 161
  • 298

There is no explicit method. It stores link identifier in $wpdb->dbh field, so I guess you could use mysql_close() on it.

Why do you need it btw? If you want to reuse $wpdb it is better to create separate wpdb object instead.