WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : I`d like to use the mysql_fetch_row function along with a "randomizer" function that would give me a random result from a mySQL table.
Categories : General SQL, MySQL, PHP, Databases Update Picture
Daevid Vincent
Date : Oct 10th 1998
Grade : 4 of 5 (graded 1 times)
Viewed : 10787
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Daevid Vincent
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

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";
?>



Point and Click Interface ala MS Access for creating SQL statements.
Categories : MySQL, Complete Programs, General SQL, PHP, Databases
phpEasySQL - Easily connect to your MySQL database with just 1 php file and 3 easy steps!
Categories : Databases, PHP, MySQL, General SQL
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
Multiple Search using PHP and Mysql
Categories : PHP, Databases, General SQL, MySQL
bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager
Categories : MySQL, PHP, MySQL, Complete Programs, Databases
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
Simple function to return the number of days in a time span between 2 given dates.
Categories : PHP, Date Time, MySQL, Databases
A simple script to count and report hits and the last modification time of an HTML page. Requires MySQL support (other DBs should work too, except possibly mSQL).
Categories : HTTP, MySQL, PHP, Databases
[PHP5] aDB PDO LIKE Database Abstraction. Switch easily from one db server to another, strong errors management, manage transactions, queries preparation and more.
Categories : PHP, PHP Classes, Databases, MS SQL Server, MySQL
MySQL Web Interface
Categories : MySQL, Databases, PHP
A PHP useradmin for MySQL. Uploading is easy. The only thing you need is PHP and MySQL installed!
Categories : MySQL, Databases, PHP, HTML and PHP
Visits-tracking
Categories : PHP, Databases, MySQL, Errors and Logging, Functions
PHP Object Example of the Perl DBI with MySQL
Categories : PHP, PHP Classes, MySQL, Databases, Perl
Finds the median in an array of numbers - Can be used with a MySql database column read into an array
Categories : PHP, Arrays, Databases, MySQL
Password reminder
Categories : PHP, PHP Classes, Databases, MySQL, Mail