|
|
here is one I use...
Daevid Vincent
http://TheMatrix.com/frizb/query.phtml
<?
srand(date("s"));
$result = mysql_db_query("frizbcd","SELECT cd_id FROM CD_Table",$linkid);
$rnum = rand() % mysql_numrows($result);
$sql ="SELECT cd_id,artist_title,upc FROM CD_Table WHERE cd_id = ";
$sql .= mysql_result($result,$rnum,"cd_id");
$result = mysql_db_query("frizbcd",$sql,$linkid);
echo "<TABLE BORDER=\"1\" BGCOLOR=\"#000000\" CELLPADDING=\"10\" CELLSPACING=
\"0\">";
$artisttitle = split("/",mysql_result($result,$ridx,"artist_title"));
echo "<TR Align=\"CENTER\"><TD><FONT FACE=\"Verdana, Arial, Helvetica\" SIZE=-
2>
Do you have this CD by <B>$artisttitle[0]</B> in YOUR collection?<P>";
$image = "cdimages/".strtolower(mysql_result($result,0,"upc")).".gif";
if (file_exists($image)) { echo "<IMG SRC=\"$image\"><P>"; }
echo "<FORM Action=\"show.phtml\" Method=\"Post\">";
echo "<INPUT Name=action Type=Submit Value=\"$artisttitle[1]\">";
echo "<INPUT Name=ID Type=hidden Value=\"".mysql_result($result,0,"cd_id")."\">
</FORM></FONT></TD></TR></TABLE><P>";
echo $totalcds," CDs currently in the database";
?> |
|
| This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases, MySQL, Complete Programs, PHP, Databases | | | Multiple Search using PHP and Mysql Categories : PHP, Databases, General SQL, MySQL | | | Point and Click Interface ala MS Access for creating SQL statements. Categories : MySQL, Complete Programs, General SQL, PHP, Databases | | | This function will populate the options in a drop down HTML select list
in a form from a database query.
Categories : MySQL, General SQL, PHP, HTML and PHP, Databases | | | bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager Categories : MySQL, PHP, MySQL, Complete Programs, Databases | | | phpEasySQL - Easily connect to your MySQL database with just 1 php file and 3 easy steps! Categories : Databases, PHP, MySQL, General SQL | | | Data Retrieve from Mysql using AJAX with PHP Categories : PHP, AJAX, Date Time, Databases, MySQL | | | Simple PHP Form Auto Generation based on MySQL query Categories : PHP, Form Processing, Databases, MySQL, Sessions | | | Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields Categories : MySQL, Date Time, PHP, Databases | | | Creating thumbnails from MySQL Blobs online Categories : PHP, MySQL, Graphics, HTML and PHP, Databases | | | How to thread a list of messages in database
and show it in a treelike structure Categories : PHP, MySQL, Databases | | | complete, simple, working example of a login screen/system using php functions, cookies, and a mysql database for begginers. Categories : Authentication, Complete Programs, PHP, MySQL, Databases | | | color codes for positive and negative numbers Categories : PHP, MySQL, Databases, HTML | | | A login page that require username, password and userlevel. Categories : PHP, Security, Sessions, MySQL, Databases | | | Storing / Retrieving pictures from database This can be used for banner / ads exchange. very useful for people developing big portal with ads in the site........ Categories : PHP, MySQL, Databases, HTML and PHP | |
| |
| |
|