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 : Three ways to access data selected by a mysql query
Categories : MySQL, PHP, Databases
Boaz Yahav
Date : Apr 07th 1998
Grade : 3 of 5 (graded 4 times)
Viewed : 21973
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Boaz Yahav
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

1.
<?
$row = mysql_fetch_row($result);
?>
Returns a regular array, $row, $row[0] is the first element,
$row[1] is the second element, ...
mysql_num_fields($result) returns the number of fields in
the result.

2.
<?
$row = mysql_fetch_array($result);
?>
Returns an array that contains all of the above elements,
but in addition, it contains associative indices too.
For example, if the result is

username | password
-------------------------------------
bourbon | abc
berber | efg

Then when you do :
<?
$row = mysql_fetch_array($result)
?>
for the first time:

<?
$row[0] = $row["username"] = "bourbon"
$row[1] = $row["password"] = "abc"

//The second time:
$row[0] = $row["username"] = "berber"
$row[1] = $row["password"] = "efg"
?>

(it doesn`t matter how the result was generated,
i.e. by select * or by select username,password).

3.
<?
$row = mysql_fetch_object($result);
?>
Returns an object that describes the row. In the above
example, the first time you`d call it:

<?
$row->username = "bourbon"
$row->password = "abc"

//The second time:
$row->username = "berber"
$row->password = "efg"
?>



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
Identify and log search engine access (spiders, robots, etc.) to a page.
Categories : HTTP, Environment Variables, PHP, MySQL, Databases
Visits-tracking
Categories : PHP, Databases, MySQL, Errors and Logging, Functions
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
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
dynamic table columns
Categories : PHP, HTML and PHP, Arrays, Databases, MySQL
Pull Down Surfing - Surf on Change
Categories : Java Script, MySQL, HTML and PHP, PHP, Databases
Online Automatic Class Generator for MySQL Tables
Categories : PHP, PHP Classes, Classes and Objects, Databases, MySQL
create a grid out of <INPUT TYPE=TEXT> then saving to a database. Uses a 'multi-dimension array', but not really as the array is just one big array with the index of "[$i][$j]". Have a look at the code and you'll see what I mean.
Categories : PHP, MySQL, Arrays, Databases
Specify your connection settings and create a link to a MySQL database.
Categories : PHP, PHP Classes, Databases, MySQL, Beginner Guides
Paginator - a class that can help you to split MySQL database query result sets to pages.
Categories : MySQL, Databases, HTML, PHP
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0
Categories : PHP, Sessions, Databases, MySQL
A template script to provide the ability to get the next or previous n records from a MySQL database.
Categories : Databases, PHP, MySQL