mysql LOLCODE
By: a guest | Jun 16th, 2009 | Syntax:
PHP | Size: 1.18 KB | Hits: 167 | Expires: Never
<?php
/**
* LOLCode
*
* @package LOLCode
* @author 3picM1ke
* @copyright 2009
*/
function DB( $sHost, $sUser, $sPass, $sDb )
{
}
function ASK( $sQuery )
{
$aSearch = array( 'CAN I PLZ GET', 'ALL UP IN', 'OMG', 'ZORT BY', 'NO MORE THAN', 'PLZ ADD TO', 'MAKE', ' IZ ', ' N ' );
$aReplace = array( 'SELECT', 'FROM', 'WHERE', 'ORDER BY', 'LIMIT', 'INSERT INTO', 'SET', ' = ', ' AND ' );
// Not inside single quotes (strings)
$aQuotes = explode( "'", $sQuery );
foreach( $aQuotes as $nKey => $sQuote )
{
if( ( $nKey % 2 ) == 0 )
{
$aQuotes[ $nKey ] = str_replace( $aSearch, $aReplace, $sQuote );
}
}
$sQuery = implode( "'", $aQuotes );
return $rResult;
}
function MUCH( $rResult )
{
}
function DBUCKET( $rResult )
{
}
?>