<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[David Hendler&#039;s Writing]]></provider_name><provider_url><![CDATA[https://freetaco.wordpress.com]]></provider_url><author_name><![CDATA[David Hendler]]></author_name><author_url><![CDATA[https://freetaco.wordpress.com/author/davidhendler/]]></author_url><title><![CDATA[MySQL / PHP handy&nbsp;reference]]></title><type><![CDATA[link]]></type><html><![CDATA[<p>We work a lot with MySQL and PHP. WEll, not as much as we&#8217;d like, but we are learning. And we are getting better. But in the mean time, we use a lot of references, including many online ones. Here are some handy things we recently came across to help us with a trouble ticket application we are building, some of which is embarrasingly simple and basic, but it helps to write it out:</p>
<p>MySQL manual <a href="http://dev.mysql.com/doc/refman/5.0/en/insert-select.html">on INSERT</a>.</p>
<p>A very nicely laid out set of <a href="http://coronet.iicm.edu/mysql/content.html">things you can do with your records</a> from the Institute for Information Systems and and Computer Media. Includes some easy examples.</p>
<p>FAQTS has some good <a href="http://www.faqts.com/knowledge_base/index.phtml/fid/10">PHP FAQs</a> going, including this nice reminder on how to access the <a href="http://www.faqts.com/knowledge_base/view.phtml/aid/6257/fid/12">last record in a table</a>. Note: the queries on this page have a type. It should read &#8220;mysql_query&#8221; instead of what&#8217;s lsited.</p>
<p>Computing dot net helped clarify that  one should <a href="http://www.computing.net/webdevel/wwwboard/forum/770.html">use mysql_num_rows</a>, and not mysql_numrows.</p>
<p>We learned a bit about the necessity of using <a href="http://us3.php.net/mysql_fetch_row">mysql_fetch_row</a> for this early part of the project. PHP Addict <a href="http://www.phpaddict.com/forum2/543.html">helped us crack through</a> the maddness in their help forum. The good folks at Zend (the PHP folks themselves) had <a href="http://www.zend.com/php/beginners/php101-8.php">many good examples</a> for it. But it was Larry Ullman (whose PeachPit books are nice) who empahsized that it (or something like it) is <a href="http://www.dmcinsights.com/phorum/read.php?8,21276,21278">always needed</a>: &#8220;What you are printing is just a resource ID. <strong>You ALWAYS have to use mysql_fetch_array() to access the actual returned information</strong>&#8220;. For good measure, here is the PHP manual entry on <a href="http://us2.php.net/manual/en/function.mysql-fetch-array.php">mysql_fetch_array()</a>.</p>
]]></html></oembed>