<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: DB_Table Problem</title>
	<atom:link href="http://www.idealwebtools.com/blog/db_table-problem/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.idealwebtools.com/blog/db_table-problem/</link>
	<description>Blogging is fun</description>
	<pubDate>Mon, 06 Oct 2008 19:35:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: maxi_million</title>
		<link>http://www.idealwebtools.com/blog/db_table-problem/#comment-68</link>
		<dc:creator>maxi_million</dc:creator>
		<pubDate>Fri, 17 Feb 2006 07:03:31 +0000</pubDate>
		<guid isPermaLink="false">http://idealwebtools.com/blog/?p=15#comment-68</guid>
		<description>in fact theres another problem with another class that comes with DB_Table package called DB_Table_Manager

what interests me here is this cool method: create()

all very neat and convenient...just pass the params and it tries to create the table for you also...

TILL you come to around line 204...its horror!
$newIdxName = $table . '_' . $idxname . '_idx';

and then..line 208...
if (strlen($newIdxName) &#62; 30) {
  return DB_Table::throwError(
     DB_TABLE_ERR_IDX_STRLEN,
     "'$idxname' ('$newIdxName')"
  );
}

its all very good it tries to take care of possible errors in oracle and pgsql...
but what about us poor souls with mysql...

i did the despicable thing...simply commented out that portion...but any better alternatives...

i mean you may sometimes get a littele prosaic and give a lonfg name to your table...but hardly expect to be rewarded with a PEAR error</description>
		<content:encoded><![CDATA[<p>in fact theres another problem with another class that comes with DB_Table package called DB_Table_Manager</p>
<p>what interests me here is this cool method: create()</p>
<p>all very neat and convenient&#8230;just pass the params and it tries to create the table for you also&#8230;</p>
<p>TILL you come to around line 204&#8230;its horror!<br />
$newIdxName = $table . &#8216;_&#8217; . $idxname . &#8216;_idx&#8217;;</p>
<p>and then..line 208&#8230;<br />
if (strlen($newIdxName) &gt; 30) {<br />
  return DB_Table::throwError(<br />
     DB_TABLE_ERR_IDX_STRLEN,<br />
     &#8220;&#8216;$idxname&#8217; (&#8217;$newIdxName&#8217;)&#8221;<br />
  );<br />
}</p>
<p>its all very good it tries to take care of possible errors in oracle and pgsql&#8230;<br />
but what about us poor souls with mysql&#8230;</p>
<p>i did the despicable thing&#8230;simply commented out that portion&#8230;but any better alternatives&#8230;</p>
<p>i mean you may sometimes get a littele prosaic and give a lonfg name to your table&#8230;but hardly expect to be rewarded with a PEAR error</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maxi_million</title>
		<link>http://www.idealwebtools.com/blog/db_table-problem/#comment-67</link>
		<dc:creator>maxi_million</dc:creator>
		<pubDate>Fri, 17 Feb 2006 06:45:52 +0000</pubDate>
		<guid isPermaLink="false">http://idealwebtools.com/blog/?p=15#comment-67</guid>
		<description>reg: Problem with AUTO_INCREMENT

faced the same problem myself. i found a neat solution...atleast works fine with me...
made a class called DB_Table_Mod
and rewritten the nextID() function to return the next autoincrement value. the function simply returns the max value + 1
of course my other classes extends or needs an object of DB_Table_Mod</description>
		<content:encoded><![CDATA[<p>reg: Problem with AUTO_INCREMENT</p>
<p>faced the same problem myself. i found a neat solution&#8230;atleast works fine with me&#8230;<br />
made a class called DB_Table_Mod<br />
and rewritten the nextID() function to return the next autoincrement value. the function simply returns the max value + 1<br />
of course my other classes extends or needs an object of DB_Table_Mod</p>
]]></content:encoded>
	</item>
</channel>
</rss>
