Create DB Table from .SQL (dump) file

Not a really complex thing, but something that comes in handy if you’re moving data around and need to quickly create MySQL db tables through PHP.   <?php function create_table($file) { $file_content = file($file); $query = “”; foreach($file_content as $sql_line) { if(trim($sql_line) != “” &amp;&amp; strpos($sql_line, “–“) === false) { $query .= $sql_line; if (substr(rtrim($query), …

Create DB Table from .SQL (dump) file Read More »

WPMU LDAP plugin fixes

So, one of the little projects I’ve been asked to help with at Lane is to move a number of WordPress websites from an old WordPress Multi-User installation to a fancy new server with a WordPress Network (basically the same thing, just called a network since 3.something).  Anyway, they wanted to make it really slick, …

WPMU LDAP plugin fixes Read More »