Skip to content

Instantly share code, notes, and snippets.

@bazo
Forked from anonymous/gist:5427135
Last active December 16, 2015 11:28
Show Gist options
  • Save bazo/5427161 to your computer and use it in GitHub Desktop.
Save bazo/5427161 to your computer and use it in GitHub Desktop.
<?php
//sid.php (indexy)
if(isset($SID["_MSG_ARRAY"])) foreach ( $SID["_MSG_ARRAY"] as $m ) $SID["MESSAGES"] .= $m;
if(isset($SID["_ERR_ARRAY"])) foreach ( $SID["_ERR_ARRAY"] as $m ) $SID["ERRORS"] .= $m;
if(isset($SID["_CON_ARRAY"])) foreach ( $SID["_CON_ARRAY"] as $m ) $SID["CONTENT"] .= $m;
//sid.php (variable)
//z kerej riti sa vzal $select_flag?
if(isset($select_flag)) {
if($sth) select_results($sth);
else message('Empty result');
} else {
$elapsed_time = microtime(TRUE) - $SID['query_start_time'];
if($multistmt_flag)
message("$stmt_count statements executed.");
else
message("Statement affected " . $sth->rowCount() . " row(s) in " . number_format($elapsed_time * 1000, 2) . " milliseconds.");
}
}
//main.php (indexy)
<?php echo $SID["MESSAGES"] ?><?php echo $SID["ERRORS"] ?>
<?php echo $SID["CONTENT"] ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment