X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fdb%2Flib-mysqli.php;h=b3559bf7e807a03548b5e511da1dd46517b9e87a;hp=4ff03a5a372b26d339653ebe79c01c3e30617fa3;hb=095f5ab59b539834d2c67e5d409d01820e10d8be;hpb=ed930d1133b51edc7ec2379d91286d64afd9bc4f diff --git a/inc/db/lib-mysqli.php b/inc/db/lib-mysqli.php index 4ff03a5a37..b3559bf7e8 100644 --- a/inc/db/lib-mysqli.php +++ b/inc/db/lib-mysqli.php @@ -11,7 +11,7 @@ * Kurzbeschreibung : Datenbankschicht fuer MySQL 3/4/5 Server (MySQLi)* * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2013 by Mailer Developer Team * + * Copyright (c) 2009 - 2016 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -346,7 +346,7 @@ function setSqlError ($file, $line, $message) { // Checks whether given link is a valid SQL link function isValidSqlLink ($linkInstance) { - // Is it a resource? + // Is it an object? $isValid = (($linkInstance instanceof mysqli) || ($linkInstance instanceof mysqli_result)); // Debug message @@ -356,5 +356,17 @@ function isValidSqlLink ($linkInstance) { return $isValid; } +// Checks whether given result is really a result +function isSqlResult ($resultInstance) { + // Is it a resource? + $isValid = ($resultInstance instanceof mysqli_result); + + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'resultInstance[]=' . gettype($resultInstance). ',isValid=' . intval($isValid)); + + // Return result + return $isValid; +} + // [EOF] ?>