<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - DB lookup question]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/17879/"/>
	<updated>2007-12-31T14:55:23Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/17879/db-lookup-question/</id>
		<entry>
			<title type="html"><![CDATA[Re: DB lookup question]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/106097/#p106097"/>
			<content type="html"><![CDATA[<p><img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>Thanks again. <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /> Just cross referenced that one to the pgsql variant:<br /></p><div class="codebox"><pre><code>pg_result_seek($result, 0);</code></pre></div><p>and it works an absolute treat. <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2007-12-31T14:55:23Z</updated>
			<id>http://punbb.informer.com/forums/post/106097/#p106097</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB lookup question]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/106094/#p106094"/>
			<content type="html"><![CDATA[<p>Whoops, I gave you the MySQLi one <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>For regular MySQL it would be:<br /></p><div class="codebox"><pre><code>mysql_data_seek($result, 0);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[elbekko]]></name>
				<uri>http://punbb.informer.com/forums/user/3935/</uri>
			</author>
			<updated>2007-12-31T14:44:28Z</updated>
			<id>http://punbb.informer.com/forums/post/106094/#p106094</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB lookup question]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/106078/#p106078"/>
			<content type="html"><![CDATA[<p>Just making sure I&#039;m not missing the gist on that link. <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> So effectively, calling:</p><div class="codebox"><pre><code>$result-&gt;data_seek(0);</code></pre></div><p>would reset the pointer back to zero so that a later fetch_assoc in a while loop would start from the beginning again?</p><br /><p>Thanks again,</p><p>Matt</p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2007-12-31T02:03:12Z</updated>
			<id>http://punbb.informer.com/forums/post/106078/#p106078</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB lookup question]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/106063/#p106063"/>
			<content type="html"><![CDATA[<p><a href="http://be.php.net/manual/en/function.mysqli-data-seek.php">http://be.php.net/manual/en/function.my &#133; a-seek.php</a></p>]]></content>
			<author>
				<name><![CDATA[elbekko]]></name>
				<uri>http://punbb.informer.com/forums/user/3935/</uri>
			</author>
			<updated>2007-12-30T19:50:19Z</updated>
			<id>http://punbb.informer.com/forums/post/106063/#p106063</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB lookup question]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/106059/#p106059"/>
			<content type="html"><![CDATA[<p>Cheers. <img src="http://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /> Just one last question. How does one reset the pointer?</p><br /><p>Thanks again,</p><p>Matt</p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2007-12-30T18:46:23Z</updated>
			<id>http://punbb.informer.com/forums/post/106059/#p106059</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB lookup question]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/106058/#p106058"/>
			<content type="html"><![CDATA[<p>It&#039;ll get the current row and advance the internal resultset pointer by one. You can reset that pointer so you can use the thing again later on.</p>]]></content>
			<author>
				<name><![CDATA[elbekko]]></name>
				<uri>http://punbb.informer.com/forums/user/3935/</uri>
			</author>
			<updated>2007-12-30T18:43:05Z</updated>
			<id>http://punbb.informer.com/forums/post/106058/#p106058</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[DB lookup question]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/106046/#p106046"/>
			<content type="html"><![CDATA[<p>If one has a db query/lookup which will return multiple rows, would the following just return the required item from the first row of the result all or rows?</p><div class="codebox"><pre><code>list($lastpost) = $db-&gt;fetch_row($result);</code></pre></div><p>Result is a lookup which is ordered by last post, so the first row has the last post info I require, but I&#039;m not quite sure if the above will work as I think/expect. <img src="http://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> Plus, running that command would still leave all the info in result as is, to be used in a while loop later on?</p><br /><p>Thanks again,</p><p>Matt</p>]]></content>
			<author>
				<name><![CDATA[MattF]]></name>
				<uri>http://punbb.informer.com/forums/user/9938/</uri>
			</author>
			<updated>2007-12-30T16:47:58Z</updated>
			<id>http://punbb.informer.com/forums/post/106046/#p106046</id>
		</entry>
</feed>
