<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-24675105</id><updated>2011-04-21T18:01:44.675-07:00</updated><title type='text'>MySQL &amp; PHP</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://php-id.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://php-id.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>yuni</name><uri>http://www.blogger.com/profile/11799255764880694014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24675105.post-114322279969314760</id><published>2006-03-24T09:51:00.000-08:00</published><updated>2006-03-24T09:53:19.696-08:00</updated><title type='text'></title><content type='html'>&lt;div align="justify"&gt;&lt;a name="function.mysql-fetch-array"&gt;&lt;/a&gt;mysql_fetch_array&lt;br /&gt;&lt;a name="AEN100480"&gt;&lt;/a&gt;&lt;br /&gt;(PHP 3, PHP 4, PHP 5)mysql_fetch_array -- Fetch a result row as an associative array, a numeric array, or both&lt;br /&gt;&lt;a name="AEN100483"&gt;&lt;/a&gt;&lt;br /&gt;Descriptionarray mysql_fetch_array ( resource result [, int result_type] )&lt;br /&gt;Returns an array that corresponds to the fetched row and moves the internal data pointer ahead.&lt;br /&gt;&lt;a name="AEN100495"&gt;&lt;/a&gt;&lt;br /&gt;Parameters&lt;br /&gt;result&lt;br /&gt;The result &lt;a href="http://id2.php.net/manual/en/language.types.resource.php"&gt;resource&lt;/a&gt; that is being evaluated. This result comes from a call to &lt;a href="http://id2.php.net/manual/en/function.mysql-query.php"&gt;mysql_query()&lt;/a&gt;.&lt;br /&gt;result_type&lt;br /&gt;The type of array that is to be fetched. It's a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and the default value of MYSQL_BOTH.&lt;br /&gt;&lt;a name="AEN100514"&gt;&lt;/a&gt;&lt;br /&gt;Return Values&lt;br /&gt;Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. The type of returned array depends on how result_type is defined. By using MYSQL_BOTH (default), you'll get an array with both associative and number indices. Using MYSQL_ASSOC, you only get associative indices (as &lt;a href="http://id2.php.net/manual/en/function.mysql-fetch-assoc.php"&gt;mysql_fetch_assoc()&lt;/a&gt; works), using MYSQL_NUM, you only get number indices (as &lt;a href="http://id2.php.net/manual/en/function.mysql-fetch-row.php"&gt;mysql_fetch_row()&lt;/a&gt; works).&lt;br /&gt;If two or more columns of the result have the same field names, the last column will take precedence. To access the other column(s) of the same name, you must use the numeric index of the column or make an alias for the column. For aliased columns, you cannot access the contents with the original column name. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24675105-114322279969314760?l=php-id.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-id.blogspot.com/feeds/114322279969314760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24675105&amp;postID=114322279969314760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322279969314760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322279969314760'/><link rel='alternate' type='text/html' href='http://php-id.blogspot.com/2006/03/mysqlfetcharray-php-3-php-4-php.html' title=''/><author><name>yuni</name><uri>http://www.blogger.com/profile/11799255764880694014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24675105.post-114322243778684163</id><published>2006-03-24T09:43:00.000-08:00</published><updated>2006-03-24T09:47:17.790-08:00</updated><title type='text'></title><content type='html'>&lt;div align="justify"&gt;&lt;a name="function.mysql-result"&gt;&lt;/a&gt;&lt;span style="font-size:130%;"&gt;mysql_result&lt;/span&gt;&lt;br /&gt;&lt;a name="AEN102312"&gt;&lt;/a&gt;&lt;br /&gt;(PHP 3, PHP 4, PHP 5)mysql_result -- Get result data&lt;br /&gt;&lt;a name="AEN102315"&gt;&lt;/a&gt;&lt;br /&gt;Descriptionstring mysql_result ( resource result, int row [, mixed field] )&lt;br /&gt;Retrieves the contents of one cell from a MySQL result set.&lt;br /&gt;When working on large result sets, you should consider using one of the functions that fetch an entire row (specified below). As these functions return the contents of multiple cells in one function call, they're MUCH quicker than mysql_result(). Also, note that specifying a numeric offset for the field argument is much quicker than specifying a fieldname or tablename.fieldname argument. &lt;/div&gt;&lt;div align="justify"&gt; &lt;/div&gt;&lt;a name="AEN102355"&gt;&lt;/a&gt;&lt;div align="justify"&gt;&lt;br /&gt;Return Values&lt;br /&gt;The contents of one cell from a MySQL result set on success, or FALSE on failure.&lt;br /&gt;&lt;a name="AEN102359"&gt;&lt;/a&gt;&lt;br /&gt;Examples&lt;br /&gt;&lt;a name="AEN102362"&gt;&lt;/a&gt;&lt;br /&gt;Example 1. mysql_result() example&lt;br /&gt;&lt;?php&lt;/div&gt;&lt;div align="justify"&gt;$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');&lt;/div&gt;&lt;div align="justify"&gt;if (!$link) {&lt;/div&gt;&lt;div align="justify"&gt;   die('Could not connect: ' . mysql_error());&lt;/div&gt;&lt;div align="justify"&gt;}&lt;/div&gt;&lt;div align="justify"&gt;$result = mysql_query('SELECT name FROM work.employee');&lt;/div&gt;&lt;div align="justify"&gt;if (!$result) {&lt;/div&gt;&lt;div align="justify"&gt;   die('Could not query:' . mysql_error());&lt;/div&gt;&lt;div align="justify"&gt;}&lt;/div&gt;&lt;div align="justify"&gt;echo mysql_result($result, 2); // outputs third employee's name&lt;/div&gt;&lt;div align="justify"&gt;mysql_close($link);&lt;/div&gt;&lt;div align="justify"&gt;?&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24675105-114322243778684163?l=php-id.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-id.blogspot.com/feeds/114322243778684163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24675105&amp;postID=114322243778684163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322243778684163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322243778684163'/><link rel='alternate' type='text/html' href='http://php-id.blogspot.com/2006/03/mysqlresult-php-3-php-4-php.html' title=''/><author><name>yuni</name><uri>http://www.blogger.com/profile/11799255764880694014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24675105.post-114322217753334932</id><published>2006-03-24T09:40:00.000-08:00</published><updated>2006-03-24T09:42:57.536-08:00</updated><title type='text'></title><content type='html'>About New York PHPNYPHP is a non-profit organization committed to promoting and supporting the PHP programming language, helping New Yorkers share development experiences, and developing Open Source projects for the PHP community.Join UsSubscribe to our mailing lists and aid the community by sharing your experiences, leading discussions and offering support. Plus, we are always eager for energetic directors to join and help build the NY and worldwide PHP communities.Attend MeetingsOur free monthly meetings are open to the public and held on the 4th Tuesday of the month at IBM. Check our website for details.Acquire TechnologyWith PHP connecting many facets of the Internet, we support the AMP (Apache/MySQL/PHP) Technology suite, plus JSP, .NET, ColdFusion, Oracle and a variety of operating systems. Let the NYPHP community help you reach a new level of performance and functionality.Learn MoreYou'll find NYPHP's projects, mailing lists, announcements, job opportunities, and up-to-the-minute information about meetings, news and events at http://nyphp.org.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24675105-114322217753334932?l=php-id.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-id.blogspot.com/feeds/114322217753334932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24675105&amp;postID=114322217753334932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322217753334932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322217753334932'/><link rel='alternate' type='text/html' href='http://php-id.blogspot.com/2006/03/about-new-york-phpnyphp-is-non-profit.html' title=''/><author><name>yuni</name><uri>http://www.blogger.com/profile/11799255764880694014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24675105.post-114322193824065006</id><published>2006-03-24T09:34:00.000-08:00</published><updated>2006-03-24T09:38:58.243-08:00</updated><title type='text'></title><content type='html'>This simple example shows how to connect, execute a query, print resulting rows and disconnect from a MySQL database.&lt;br /&gt;&lt;a name="AEN99559"&gt;&lt;/a&gt;&lt;br /&gt;MySQL extension overview example&lt;br /&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;// Connecting, selecting database&lt;br /&gt;$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')&lt;br /&gt;  or die('Could not connect: ' . mysql_error());&lt;br /&gt;echo 'Connected successfully';&lt;br /&gt;mysql_select_db('my_database') or die('Could not select database');&lt;br /&gt;&lt;br /&gt;// Performing SQL query$query = 'SELECT * FROM my_table';&lt;br /&gt;$result = mysql_query($query) or die('Query failed: ' . mysql_error());&lt;br /&gt;&lt;br /&gt;// Printing results in HTML&lt;br /&gt;echo "&lt;table&gt;\n";&lt;br /&gt;while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { &lt;br /&gt; echo "\t&lt;tr&gt;\n";&lt;br /&gt;foreach ($line as $col_value) {&lt;br /&gt;echo "\t\t&lt;td&gt;$col_value&lt;/td&gt;\n";&lt;br /&gt;   }&lt;br /&gt;   echo "\t&lt;/tr&gt;\n";&lt;br /&gt;}&lt;br /&gt;echo "&lt;/table&gt;\n";&lt;br /&gt;// Free resultsetmysql_free_result($result);&lt;br /&gt;&lt;br /&gt;// Closing connection&lt;br /&gt;mysql_close($link);&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24675105-114322193824065006?l=php-id.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-id.blogspot.com/feeds/114322193824065006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24675105&amp;postID=114322193824065006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322193824065006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322193824065006'/><link rel='alternate' type='text/html' href='http://php-id.blogspot.com/2006/03/this-simple-example-shows-how-to.html' title=''/><author><name>yuni</name><uri>http://www.blogger.com/profile/11799255764880694014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24675105.post-114322160243629098</id><published>2006-03-24T09:32:00.000-08:00</published><updated>2006-03-24T09:33:22.436-08:00</updated><title type='text'></title><content type='html'>&lt;a name="mysql.installation.windows"&gt;Installation on Windows Systems&lt;/a&gt;&lt;br /&gt;&lt;a name="AEN99331"&gt;PHP 4&lt;/a&gt;&lt;br /&gt;The PHP MySQL extension is compiled into PHP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24675105-114322160243629098?l=php-id.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-id.blogspot.com/feeds/114322160243629098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24675105&amp;postID=114322160243629098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322160243629098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322160243629098'/><link rel='alternate' type='text/html' href='http://php-id.blogspot.com/2006/03/installation-on-windows-systems-php-4.html' title=''/><author><name>yuni</name><uri>http://www.blogger.com/profile/11799255764880694014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24675105.post-114322151326348714</id><published>2006-03-24T09:26:00.000-08:00</published><updated>2006-03-24T09:31:53.280-08:00</updated><title type='text'></title><content type='html'>&lt;a name="AEN99334"&gt;PHP 5+&lt;/a&gt;&lt;br /&gt;MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "&lt;a href="http://id2.php.net/manual/en/printwn/faq.installation.php#faq.installation.addtopath"&gt;How do I add my PHP directory to the PATH on Windows&lt;/a&gt;" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24675105-114322151326348714?l=php-id.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-id.blogspot.com/feeds/114322151326348714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24675105&amp;postID=114322151326348714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322151326348714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24675105/posts/default/114322151326348714'/><link rel='alternate' type='text/html' href='http://php-id.blogspot.com/2006/03/php-5-mysql-is-no-longer-enabled-by.html' title=''/><author><name>yuni</name><uri>http://www.blogger.com/profile/11799255764880694014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
