Popular PHP recipes tagged "database"http://code.activestate.com/recipes/langs/php/tags/database/2011-02-24T21:43:55-08:00ActiveState Code RecipesYouTube-like primary key generation (PHP)
2011-02-24T21:43:55-08:00Slava Yansonhttp://code.activestate.com/recipes/users/4176967/http://code.activestate.com/recipes/577571-youtube-like-primary-key-generation/
<p style="color: grey">
PHP
recipe 577571
by <a href="/recipes/users/4176967/">Slava Yanson</a>
(<a href="/recipes/tags/activerecord/">activerecord</a>, <a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/php/">php</a>, <a href="/recipes/tags/unique/">unique</a>).
Revision 4.
</p>
<p>If you have more then 1 primary database servers - you have probably experienced the pain of primary key overlapping... Here is a super simple solution that will generate a hash of random letters and numbers.</p>
<p>Included is a sample ActiveRecord class (MyTable.php).</p>
Bass class for PDO abstraction (PHP)
2010-03-28T01:16:30-07:00Jeff Griffithshttp://code.activestate.com/recipes/users/835605/http://code.activestate.com/recipes/522993-bass-class-for-pdo-abstraction/
<p style="color: grey">
PHP
recipe 522993
by <a href="/recipes/users/835605/">Jeff Griffiths</a>
(<a href="/recipes/tags/database/">database</a>).
Revision 2.
</p>
<p>This is a simple base class that extends PDO and provides some useful helper functions such as _getRows and _getAsRow()</p>
Microsoft Access Database Connectivity (DSN-Less) (PHP)
2006-08-29T03:08:29-07:00Erick Guanlaohttp://code.activestate.com/recipes/users/670494/http://code.activestate.com/recipes/163447-microsoft-access-database-connectivity-dsn-less/
<p style="color: grey">
PHP
recipe 163447
by <a href="/recipes/users/670494/">Erick Guanlao</a>
(<a href="/recipes/tags/database/">database</a>).
Revision 4.
</p>
<p>An example of connecting to a Microsoft Access database, executing an SQL query, and displaying the results in HTML using PHP and COM (Windows only).</p>
<p>NOTE: This works with PHP 4.x. I have been unsuccessful with getting this to work with PHP 5.1.6 and Apache 2.0.59 on Windowx XP Professional.</p>
Microsoft Access Database Connectivity (PHP)
2002-04-28T10:39:45-07:00Daniel Hendrickshttp://code.activestate.com/recipes/users/386772/http://code.activestate.com/recipes/123709-microsoft-access-database-connectivity/
<p style="color: grey">
PHP
recipe 123709
by <a href="/recipes/users/386772/">Daniel Hendricks</a>
(<a href="/recipes/tags/database/">database</a>).
</p>
<p>This is an example of how you can pull data from a Microsoft Access database through ADO.</p>
PHP MySQL Search Class (PHP)
2003-10-28T19:57:45-08:00Stephen Bartholomewhttp://code.activestate.com/recipes/users/350445/http://code.activestate.com/recipes/125901-php-mysql-search-class/
<p style="color: grey">
PHP
recipe 125901
by <a href="/recipes/users/350445/">Stephen Bartholomew</a>
(<a href="/recipes/tags/database/">database</a>).
Revision 10.
</p>
<p>This class can perform a full text search over multiple columns of a MySQL database table, matching entries containing all search terms parsed to it.</p>