Commit a2a8fcfc authored by Tim Schoondergang's avatar Tim Schoondergang
Browse files

New function checkIfColumnExistInTable and updated docs

parent 418c8b29
{
"name": "timmit/db-mysql",
"description": "A simple DB layer in PHP for using MySQL",
"version": "v1.0.7",
"description": "A simple DB layer in PHP for using MySQL(i)",
"version": "v1.0.8",
"keywords": ["DB", "MySQL", "MySQLi", "database", "DB layer", "database layer"],
"license": "MIT",
"homepage": "http://www.TiMMiT.nl/",
"authors": [
......
# Fixes a vulnerability in CentOS: http://stackoverflow.com/questions/20533279/prevent-php-from-parsing-non-php-files-such-as-somefile-php-txt
<FilesMatch \.php\.txt$>
RemoveHandler .php
ForceType text/plain
</FilesMatch>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -396,8 +396,9 @@ body .modal {
background-color: white;
}
.footer-sections h1 {
.footer-sections .span4 h1 {
color: #ccccd9;
margin-top: 0;
}
.detailsbar {
......@@ -405,6 +406,10 @@ body .modal {
color: #333;
border: none;
}
.row-fluid .span2 {
width: 100%;
}
}
@media (min-width: 767px) {
......
......@@ -3,21 +3,21 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>API Documentation</title>
<title>TiMMiT DB(MySQL) Layer</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<script src="../js/html5.js"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery-1.11.0.min.js"></script>
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
......@@ -83,7 +83,7 @@
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">API Documentation</a>
<a class="brand" href="../index.html">TiMMiT DB(MySQL) Layer</a>
<div class="nav-collapse">
<ul class="nav pull-right">
......@@ -114,7 +114,7 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">0</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">14</span>
</a>
</li>
<li>
......@@ -144,28 +144,28 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-784896404"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-126978865"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-784896404" class="accordion-body collapse in">
<div id="namespace-126978865" class="accordion-body collapse in">
<div class="accordion-inner">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-953907731"></a>
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-945860540"></a>
<a href="../namespaces/TiMMiT.html" style="margin-left: 30px; padding-left: 0">TiMMiT</a>
</div>
<div id="namespace-953907731" class="accordion-body collapse ">
<div id="namespace-945860540" class="accordion-body collapse ">
<div class="accordion-inner">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-1418132287"></a>
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-1104107788"></a>
<a href="../namespaces/TiMMiT.MySQL.html" style="margin-left: 30px; padding-left: 0">MySQL</a>
</div>
<div id="namespace-1418132287" class="accordion-body collapse ">
<div id="namespace-1104107788" class="accordion-body collapse ">
<div class="accordion-inner">
......@@ -292,7 +292,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on June 11th, 2014 at 15:27.
on November 5th, 2014 at 15:55.
</section>
</section>
</section>
......
......@@ -12,9 +12,6 @@ namespace TiMMiT\MySQL;
/**
* MySQL DB connection.
*
*
* @package DB-MySQL
*/
class DB {
......@@ -39,10 +36,9 @@ namespace TiMMiT\MySQL;
public static $charset = "utf8";
/**
* Class constructor.
*
* @param array $array settings as assoc array
*/
* Class constructor.
* @param array $array settings as assoc array
*/
function __construct($array) {
if (is_array($array)) {
self::$var = $array;
......@@ -133,6 +129,20 @@ namespace TiMMiT\MySQL;
}
}
/**
* Check if column exists in table
* @param string $table
* @param string $column
* @return boolean
*/
public static function checkIfColumnExistInTable($table,$column) {
if(mysqli_num_rows(mysqli_query(self::$mlink,"SHOW COLUMNS FROM `".$table."` LIKE '".$column."';"))) {
return true;
} else {
return false;
}
}
/**
* Check if query gives result
* @param string $query
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,12 +3,12 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>API Documentation</title>
<title>TiMMiT DB(MySQL) Layer</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<link href="../css/jquery.iviewer.css" rel="stylesheet" media="all"/>
......@@ -23,11 +23,11 @@
</style>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<script src="../js/html5.js"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery-1.11.0.min.js"></script>
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
......@@ -60,7 +60,7 @@
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">API Documentation</a>
<a class="brand" href="../index.html">TiMMiT DB(MySQL) Layer</a>
<div class="nav-collapse">
<ul class="nav pull-right">
......@@ -91,7 +91,7 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">0</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">14</span>
</a>
</li>
<li>
......@@ -161,7 +161,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on June 11th, 2014 at 15:27.
on November 5th, 2014 at 15:55.
</section>
</section>
</section>
......
......@@ -45,7 +45,7 @@
<!-- \\TiMMiT\\MySQL\\DB -->
<g id="node4" class="node"><title>\\TiMMiT\\MySQL\\DB</title>
<polygon fill="none" stroke="black" points="86,-68 32,-68 32,-32 86,-32 86,-68"/>
<text text-anchor="middle" x="59" y="-47.1" font-family="Times Roman,serif" font-size="11.00">DB</text>
<text text-anchor="middle" x="59" y="-47.1" font-family="Courier,monospace" font-size="11.00">DB</text>
</g>
</g>
</svg>
......@@ -3,21 +3,21 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>API Documentation</title>
<title>TiMMiT DB(MySQL) Layer</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/prism.css" rel="stylesheet" media="all"/>
<link href="css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<script src="js/html5.js"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/ui/1.10.4/jquery-ui.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.smooth-scroll.js"></script>
<script src="js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
......@@ -35,7 +35,7 @@
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="index.html">API Documentation</a>
<a class="brand" href="index.html">TiMMiT DB(MySQL) Layer</a>
<div class="nav-collapse">
<ul class="nav pull-right">
......@@ -66,7 +66,7 @@
<ul class="dropdown-menu">
<li>
<a href="reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">0</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">14</span>
</a>
</li>
<li>
......@@ -96,28 +96,28 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-637029761"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1608795359"></a>
<a href="namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-637029761" class="accordion-body collapse in">
<div id="namespace-1608795359" class="accordion-body collapse in">
<div class="accordion-inner">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-341917926"></a>
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-90804797"></a>
<a href="namespaces/TiMMiT.html" style="margin-left: 30px; padding-left: 0">TiMMiT</a>
</div>
<div id="namespace-341917926" class="accordion-body collapse ">
<div id="namespace-90804797" class="accordion-body collapse ">
<div class="accordion-inner">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-53832388"></a>
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-369878916"></a>
<a href="namespaces/TiMMiT.MySQL.html" style="margin-left: 30px; padding-left: 0">MySQL</a>
</div>
<div id="namespace-53832388" class="accordion-body collapse ">
<div id="namespace-369878916" class="accordion-body collapse ">
<div class="accordion-inner">
......@@ -219,7 +219,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on June 11th, 2014 at 15:27.
on November 5th, 2014 at 15:55.
</section>
</section>
</section>
......
This diff is collapsed.
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment