Category: 

What Is a Fetch Array?

Article Details
  • Written By: A. Leverkuhn
  • Edited By: Andrew Jones
  • Last Modified Date: 22 August 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The atmosphere of Jupiter's moon Io collapses every time it is eclipsed by the planet.   more...

September 29 ,  2008 :  The Dow Jones Industrial Average experienced its largest one-day drop in history.  more...

A fetch array is a command that allows users to gather a specific array of variables or information. While those who are not familiar with this term may think that the fetch array is a type of programming array, the fetch array is actually a command that manipulates an array. An array is a class of programming object that is made up of multiple labeled variables. The array generally has a name or designation that allows programmers to use all of the information in the array with one command.

The most common type of fetch command for an array is used in the mySQL database technology. In this case, the fetch array is not part of mySQL, but instead, is an outside command with PHP or hypertext preprocessing syntax. The fetch array allows users to return one row from a mySQL database.

Ad

It’s important to note that in a mySQL database, the row of information that constitutes the array is made up of boxes that hold different kinds of variables. In classic computer programming arrays, the array is often made up of variables of the same type of information. For example, while a conventional computer programming array in an object-oriented language might have five different containers that each hold an integer, the mySQL database array often looks like the profile of a primary variable that is kept in the first column of the database. As a concrete example, the complete row of a mySQL database could include a person’s name, age, and state of residence.

Using the fetch array, the mySQL user can get the first set of information held in the first row of the database. For example, a fetch command for an array in this context could return this set of variables: “Tom, 35, Pennsylvania.” Users can use the fetch array of over and over again to return additional rows of information, which, in this case, would include the same pieces of information about different individuals.

This common fetch type of array command represents a good way to extract data from the standard types of databases used by today’s businesses and organizations. This is one of its primary uses within the programming community. Other types of software commands might also be called fetch arrays, but might function somewhat differently. In general, understanding the fetch array helps a developer know more about manipulating an array and its various smaller pieces of data.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

exception 'Exception' with message 'error writing captcha: Duplicate entry '2147483647' for key 'PRIMARY'' in /ssd/www/wisegeek/public_html/_core/classes/public/Captcha.php:44
Stack trace:
#0 /ssd/www/wisegeek/public_html/_core/controls/public/ControlDiscussionPostBox.php(324): Captcha->createCaptcha()
#1 /ssd/www/wisegeek/public_html/framework/classes/Control.php(104): ControlDiscussionPostBox->preRender(false)
#2 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): Control->render()
#3 /ssd/www/wisegeek/public_html/tpl/default-nocustom-lu/pages/public/article/article.htm(526): Control->__toString()
#4 /ssd/www/wisegeek/public_html/framework/classes/Control.php(300): require('/ssd/www/wisege...')
#5 /ssd/www/wisegeek/public_html/framework/classes/Control.php(309): Control->requireTpl('pages/public/ar...', Object(PageArticleCom), true)
#6 /ssd/www/wisegeek/public_html/framework/classes/Control.php(131): Control->renderTpl('pages/public/ar...', Object(PageArticleCom))
#7 /ssd/www/wisegeek/public_html/framework/classes/FormDataControl.php(87): Control->renderTemplate()
#8 /ssd/www/wisegeek/public_html/framework/classes/Control.php(109): FormDataControl->renderTemplate()
#9 /ssd/www/wisegeek/public_html/framework/classes/ScriptPage.php(50): Control->render(false)
#10 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): ScriptPage->render()
#11 /ssd/www/wisegeek/public_html/framework/classes/Page.php(97): Control->__toString()
#12 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(443): Page->processRequest()
#13 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(7): PublicFrontController->renderPage()
#14 /ssd/www/wisegeek/public_html/index.php(11): PublicFrontController::run()
#15 {main}