<?phpxml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
>
<channel>
<title>globberstack.com / topdog / Upcoming Questions</title>
<link>http://www.globberstack.com</link>
<description>Linux, Apache, MySQL & PHP Community Questions & Answers </description>
<pubDate>Fri, 10 Sep 2010 09:40:08 -0400</pubDate>
<language>en</language>
<item>
<title><![CDATA[MySQL searching on INT columns returning wrong results]]></title>
<link>http://www.globberstack.com/Questions/mysql-searching-on-int-columns-returning-wrong-results-1/</link>
<comments>http://www.globberstack.com/Questions/mysql-searching-on-int-columns-returning-wrong-results-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:40:08 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/mysql-searching-on-int-columns-returning-wrong-results-1/</guid>
<description><![CDATA[<br />            <p>I have discovered that MySQL is returning odd results when searching on INT columns.</p><br /><br /><p>a)</p><br /><br /><pre><code>SELECT *<br />  FROM `sellers` <br /> WHERE `seller_key` = '1' <br /></code></pre><br /><br /><p>Returns seller with the key 1.</p><br /><br /><p>b)</p><br /><br /><pre><code>SELECT * <br />  FROM `sellers` <br /> WHERE `seller_key` = '1sdjhksadhak' <br /></code></pre><br /><br /><p>Returns seller with the key 1.</p><br /><br /><p>c)</p><br /><br /><pre><code>SELECT * <br />  FROM `sellers` <br /> WHERE `seller_key` = '1adlksajdkj187987'<br /></code></pre><br /><br /><p>Returns seller with the key 1.</p><br /><br /><p>d)</p><br /><br /><pre><code>SELECT * <br />  FROM `sellers` <br /> WHERE `seller_key` = 'adlksajdkj187987' <br /></code></pre><br /><br /><p>Does not return anything.</p><br /><br /><p>Why does b and c return a result? if there a way to make the searching strict?</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/401434" rel="nofollow">cappuccino</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[MySQL SUM Query]]></title>
<link>http://www.globberstack.com/Questions/mysql-sum-query-1/</link>
<comments>http://www.globberstack.com/Questions/mysql-sum-query-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:36:56 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/mysql-sum-query-1/</guid>
<description><![CDATA[<br />            <p>Greetings, I've got a query that I'm struggling with, this is the first time that I am encountering this type of query. <br />I have two table as shown below.</p><br /><br /><p>xid is the primary key in parent_tbl1, while xid is the foreign key in child_tbl2</p><br /><br /><p>parent_tbl1</p><br /><br /><pre><code>xid pub <br />1    1    <br />2    1    <br />3    0    <br />4    1<br /></code></pre><br /><br /><p>child_tbl2</p><br /><br /><pre><code>id ttype fno xid  qnty<br />1  A       0    1    0<br />2  A       1    1    3<br />3  B       1    1    4<br />4  A       1    2    1  <br />5  A       1    3    2<br />6  A       1    4    3<br />7  A       1    4    1<br />8  A       1    1    1<br /></code></pre><br /><br /><p>Below is the exlanation of the query in parts, which will then need to make up the whole query.</p><br /><br /><p>I need the SUM of qnty in child_tbl2:</p><br /><br /><p>1) Who's parent's pub is '1'<br />Therefore, id 5 is eliminated from child_tbl2, this is because xid 3 is 0 in parent_tbl1</p><br /><br /><p>Results:<br />child_tbl2</p><br /><br /><pre><code>id ttype fno xid qnty<br />1  A       0    1    0<br />2  A       1    1    3<br />3  B       1    1    4<br />4  A       1    2    1<br />6  A       1    4    3<br />7  A       1    4    1<br />8  A       1    1    1<br /></code></pre><br /><br /><p>2) AND who's parent table has ttype 'A' in the child table<br />Therefore, id 3 is eliminated from the existing results because id 3's ttype is B</p><br /><br /><p>Results:<br />child_tbl2</p><br /><br /><pre><code>id ttype fno xid qnty<br />1  A       0    1    0<br />2  A       1    1    3<br />4  A       1    2    1<br />6  A       1    4    3<br />7  A       1    4    1<br />8  A       1    1    1<br /></code></pre><br /><br /><p>3) AND who's parent has '0' as one it's fno's in the child_tbl2<br />Therefore, id 4, 6 &amp; 7 are eliminated from the existing results, this is because 0 was not found in one of their fno's, while 0 was found as one of  xid 1's fno</p><br /><br /><p>Results:<br />child_tbl2</p><br /><br /><pre><code>id ttype fno xid qnty<br />1  A       0    1    0<br />2  A       1    1    3<br />8  A       1    1    1<br /></code></pre><br /><br /><p>The answer for the query should be 4</p><br /><br /><p>Below is what i've got.</p><br /><br /><pre><code>SELECT sum(child_tbl2.qnty), parent_tbl1.xid, parent_tbl1.pub, child_tbl2.ttype, child_tbl2.fno, child_tbl2.xid <br />FROM parent_tbl1, child_tbl2<br />WHERE parent_tbl1.xid = child_tbl2.xid<br />AND parent_tbl1.pub = '1'<br />AND child_tbl2.ttype = 'A'<br /><br />AND child_tbl2.fno ? <br /></code></pre><br /><br /><p>If it is possible, I do not know how to tell the dbms (MySQL) to check if Zero is one of the fno's.<br />If I say "AND child_tbl2.fno = '0'", I will be saying that the result's fno should be 0. I do not want that, I need zero to be one of the fno's in order for the query to SUM all the qnty in that particular xid</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/328798" rel="nofollow">Nich</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Creating JSON from a comma delimited string with PHP]]></title>
<link>http://www.globberstack.com/Questions/creating-json-from-a-comma-delimited-string-with-php-1/</link>
<comments>http://www.globberstack.com/Questions/creating-json-from-a-comma-delimited-string-with-php-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:36:14 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/creating-json-from-a-comma-delimited-string-with-php-1/</guid>
<description><![CDATA[<br />            <p>Hi guys,</p><br /><br /><p>I am trying to create JSON  from a comma delimited string, the string look something like this:</p><br /><br /><pre><code>One,Two,Three,Four,Five,Six,Seven<br /></code></pre><br /><br /><p>I need it to look something like this: </p><br /><br /><pre><code>[{"test":"One"},{"test":"Two"},{"test":"Three"},{"test":"Four"},{"test":"Five"},{"test":"Six"},{"test":"Seven"}]<br /></code></pre><br /><br /><p>Here is the code I have thus far:</p><br /><br /><pre><code>$string = mysql_fetch_array($test, true);<br />$woot = explode(',', $string['test']);<br /><br />$json = json_encode($woot);<br />echo($json);<br /></code></pre><br /><br /><p>Thanx in advance!</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/270311" rel="nofollow">kielie</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[What is a best practice method to log visits per page / object]]></title>
<link>http://www.globberstack.com/Questions/what-is-a-best-practice-method-to-log-visits-per-page-object-1/</link>
<comments>http://www.globberstack.com/Questions/what-is-a-best-practice-method-to-log-visits-per-page-object-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:29:49 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/what-is-a-best-practice-method-to-log-visits-per-page-object-1/</guid>
<description><![CDATA[<br />            <p>Take <a href="http://stackoverflow.com/users/104071/dassouki">my profile</a> for example, or any question number of views on this site, what is the process of logging the number of visits per page or object on a website, which I presumably think includes:</p><br /><br /><ul><br /><li>Counting registered users once (thist must be reflected in the db, which pages / objects the user has visited). this will also not include unregistered users</li><br /><li>IP: log the visit of each IP per page / object; this could be troublesome as you might have 2 different people checking the same website; or you really do want to track repeat visitors.</li><br /><li>Cookie: this will probably result in that people with multiple computers would be counted twice</li><br /><li>other method goes here ....</li><br /></ul><br /><br /><p>The question is, what is the process and best practice to count user requests?</p><br /><br /><p><strong>EDIT</strong></p><br /><br /><p>I've added the computer languages to the list of tags as they are of interest to me. Feel free to include any libraries, modules, and/or extensions that achieve the task.</p><br /><br /><p>The question could be rephrased into:</p><br /><br /><ul><br /><li>How does someone go about measuring the number of imprints when a user goes on a page? The question is not intended to be similar to what Google analytics does, rather it should be something similar to when you click on a stackoverflow question or profile and see the number of views.</li><br /></ul><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/104071" rel="nofollow">dassouki</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Is there a simple way to keep MySQL row ids from growing?]]></title>
<link>http://www.globberstack.com/Questions/is-there-a-simple-way-to-keep-mysql-row-ids-from-growing-1/</link>
<comments>http://www.globberstack.com/Questions/is-there-a-simple-way-to-keep-mysql-row-ids-from-growing-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:27:06 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/is-there-a-simple-way-to-keep-mysql-row-ids-from-growing-1/</guid>
<description><![CDATA[<br />            <p>I was wondering what the simplest way of letting a table set ids automatically is, apart from AUTO_INCREMENT.</p><br /><br /><p>I have a table that will accumulate thousands of rows over a long period of time. Some of these rows will be deleted at a later time. How do I get new rows to get the lowest available id, without getting into doing it manually.</p><br /><br /><p>Can I for instance reset AUTO_INCREMENT every time someone adds a row?</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/388916" rel="nofollow">Codemonkey</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[mysql query not giving correct results]]></title>
<link>http://www.globberstack.com/Questions/mysql-query-not-giving-correct-results-1/</link>
<comments>http://www.globberstack.com/Questions/mysql-query-not-giving-correct-results-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:16:53 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/mysql-query-not-giving-correct-results-1/</guid>
<description><![CDATA[<br />            <p>I have a table called records which has several columns, one of which is fromphone which represents a phone number.  I can run this query to see the different phone numbers:</p><br /><br /><pre><code>SELECT DISTINCT fromphone<br />FROM records<br /></code></pre><br /><br /><p>and it shows the different phone numbers.</p><br /><br /><p>However, if I run this query:</p><br /><br /><pre><code>SELECT *<br />FROM records<br />WHERE fromphone = '123-456-7890'<br /></code></pre><br /><br /><p>where fromphone is a phone number in the table, no results get returned.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/389890" rel="nofollow">JPC</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[What type does fwrite() returns?]]></title>
<link>http://www.globberstack.com/Questions/what-type-does-fwrite-returns-1/</link>
<comments>http://www.globberstack.com/Questions/what-type-does-fwrite-returns-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:16:03 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/what-type-does-fwrite-returns-1/</guid>
<description><![CDATA[<br />            <p>On the php manual we can read:</p><br /><br /><blockquote><br />  <p><strong>fwrite()</strong> returns the number of bytes written</p><br /></blockquote><br /><br /><p>Ok... but what kind of thing is "number of bytes written"?</p><br /><br /><p>Binary string? Binary number? Stream? Int? </p><br /><br /><p>I'm a little bit lost here.</p><br /><br /><p>Regards</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/378170" rel="nofollow">MEM</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Symfony Update a Model Schema]]></title>
<link>http://www.globberstack.com/Questions/symfony-update-a-model-schema-1/</link>
<comments>http://www.globberstack.com/Questions/symfony-update-a-model-schema-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:12:41 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/symfony-update-a-model-schema-1/</guid>
<description><![CDATA[<br />            <p>So heres the scenario: </p><br /><br /><p>Currently we have a development site with 3 models. We found we didn't like our initial schema and added a few rows. We re-generated the schema (doctrine:build-sql).</p><br /><br /><p>Now it forced us to drop and re-create all the tables and dump back in all the information as no ALTERS were created but rather CREATE statements only. Not a problem...</p><br /><br /><p>The big problem came to updating the models. After we ran a build-all and such a few errors popped up i.e. "Widget sort not found" etc. We figured out we needed to rebuild the models. So we can a symfony doctrine:build-models course Course (Course was the table name...course the models). This worked great and fixed the broken links within Symfony.</p><br /><br /><p>The downside is all custom code in the actions.class.php file was lost as were customizations to the _form.php page.</p><br /><br /><p>My question on this is, how do we store our own actions so they are not lost if you update a models schema? Similarly templates and such are re-generated to but do not hold any customizations.</p><br /><br /><p>There surely must be a simple solution to updating a model's schema in symfony?</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/244152" rel="nofollow">CogitoErgoSum</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[CSS Links Not Working as Planned]]></title>
<link>http://www.globberstack.com/Questions/css-links-not-working-as-planned-1/</link>
<comments>http://www.globberstack.com/Questions/css-links-not-working-as-planned-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:08:56 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/css-links-not-working-as-planned-1/</guid>
<description><![CDATA[Dear All<br /><br />My website has a navigation where the links change if you are on that page, have a look at it to see what I mean: <a href="http://www.goathland.co.cc" target="_blank">http://www.goathland.co.cc</a><br /><br />On the gallery I have done a similar thing to show the user what gallery they are in but I am having trouble getting it to work for the main gallery page. This is the HTML for the page:<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />   "http://www.w3.org/TR/html4/strict.dtd"&gt;<br />&lt;html&gt;<br />&lt;head id="galleryh"&gt;<br />&lt;title&gt;Goathland - Gallery&lt;/title&gt;<br />&lt;LINK rel="stylesheet" type="text/css" href="&#46;&#46;/stylesheet.css"&gt;<br />&lt;LINK rel="stylesheet" type="text/css" href="&#46;&#46;/print.css" media="print"&gt;<br />&lt;link rel="shortcut icon" href="&#46;&#46;/favicon.ico"&gt;<br />&lt;META http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;<br />&lt;/head&gt;<br />&lt;body id="gallery"&gt;<br />&lt;div class="container"&gt;<br />&lt;div class="header"&gt;<br />&lt;?php include("&#46;&#46;/elements/header.php"); ?&gt;<br />&lt;/div&gt;<br />&lt;div class="nav"&gt;<br />&lt;?php include("&#46;&#46;/elements/nav.php"); ?&gt;<br />&lt;/div&gt;<br />&lt;div class="right"&gt;<br />&lt;?php include("&#46;&#46;/elements/right.php"); ?&gt;<br />&lt;/div&gt;<br />&lt;div class="main"&gt;<br />&lt;h1&gt;Image Gallery&lt;/h1&gt;<br />&lt;p&gt;Welcome to my image gallery.  Here you will find all images that I have taken during building my layout.  These are split up into smaller galleries. Please click on the image of the gallery you would like to see or select one of the links below. To return to this page click the home button at the bottom of each gallery, the "Gallery Home" link or the back button on your web browser.&lt;/p&gt;<br />&lt;?php include("navtime.php"); ?&gt;<br />&lt;table&gt;<br />&lt;tr&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="buildingbaseboard"&gt;&lt;img alt="Building Baseboard Image" src="buildingbaseboard/thumbs/001_grey.jpg" onMouseOver="this.src='buildingbaseboard/thumbs/001.jpg'" onMouseOut="this.src='buildingbaseboard/thumbs/001_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="electronics"&gt;&lt;img alt="Electronics Image" src="electronics/thumbs/013_grey.jpg" onMouseOver="this.src='electronics/thumbs/013.jpg'" onMouseOut="this.src='electronics/thumbs/013_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="fittingpointsmotors"&gt;&lt;img alt="Fitting Points Motors Image" src="fittingpointsmotors/thumbs/018_grey.jpg" onMouseOver="this.src='fittingpointsmotors/thumbs/018.jpg'" onMouseOut="this.src='fittingpointsmotors/thumbs/018_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="general"&gt;&lt;img alt="Goathland From Footbridge Image" src="general/thumbs/010_grey.jpg" onMouseOver="this.src='general/thumbs/010.jpg'" onMouseOut="this.src='general/thumbs/010_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;/tr&gt;<br />&lt;tr&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Building Baseboard&lt;/p&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Electronics&lt;/p&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Fitting Points Motors&lt;/p&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;General&lt;/p&gt;&lt;/td&gt;<br />&lt;/tr&gt;<br />&lt;tr&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="lightingeurostar"&gt;&lt;img alt="Ligthing Eurostar Image" src="lightingeurostar/thumbs/010_grey.jpg" onMouseOver="this.src='lightingeurostar/thumbs/010.jpg'" onMouseOut="this.src='lightingeurostar/thumbs/010_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="makingtrackplan"&gt;&lt;img alt="Making Track Plan Image" src="makingtrackplan/thumbs/008_grey.jpg" onMouseOver="this.src='makingtrackplan/thumbs/008.jpg'" onMouseOut="this.src='makingtrackplan/thumbs/008_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="night"&gt;&lt;img alt="Night Time Image" src="night/thumbs/007_grey.jpg" onMouseOver="this.src='night/thumbs/007.jpg'" onMouseOut="this.src='night/thumbs/007_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="preparingloft"&gt;&lt;img alt="Preparing Loft Image" src="preparingloft/thumbs/009_grey.jpg" onMouseOver="this.src='preparingloft/thumbs/009.jpg'" onMouseOut="this.src='preparingloft/thumbs/009_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;/tr&gt;<br />&lt;tr&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Lighting Eurostar&lt;/p&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Making Track Plan&lt;/p&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Night Time&lt;/p&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Preparing Loft&lt;/p&gt;&lt;/td&gt;<br />&lt;/tr&gt;<br />&lt;tr&gt;<br />&lt;td class="w25"&gt;&nbsp;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="scenery"&gt;&lt;img alt="Making Tree Image" src="scenery/thumbs/017_grey.jpg" onMouseOver="this.src='scenery/thumbs/017.jpg'" onMouseOut="this.src='scenery/thumbs/017_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;a title="Click to enter gallery" href="trackcleaning"&gt;&lt;img alt="Electronic Track Cleaners Image" src="trackcleaning/thumbs/003_grey.jpg" onMouseOver="this.src='trackcleaning/thumbs/003.jpg'" onMouseOut="this.src='trackcleaning/thumbs/003_grey.jpg'"&gt;&lt;/a&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&nbsp;&lt;/td&gt;<br />&lt;/tr&gt;<br />&lt;tr&gt;<br />&lt;td class="w25"&gt;&nbsp;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Scenery&lt;/p&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&lt;p class="gal"&gt;Track Cleaning&lt;/p&gt;&lt;/td&gt;<br />&lt;td class="w25"&gt;&nbsp;&lt;/td&gt;<br />&lt;/tr&gt;<br />&lt;/table&gt;<br />&lt;/div&gt;<br />&lt;div class="footer"&gt;<br />&lt;?php include("&#46;&#46;/elements/footer.php"); ?&gt;<br />&lt;/div&gt;<br />&lt;/div&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</div><br />And this is the CSS:<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>#cse-search-results iframe {<br />width: 99%;<br />}<br /><br />a.nav:link {<br />color: #ffffcc;<br />font-size: 13px;<br />font-weight: bolder;<br />text-decoration: none;<br />}<br /><br />a.nav:visited {<br />color: #ffffcc;<br />font-size: 13px;<br />font-weight: bolder;<br />text-decoration: none;<br />}<br /><br />a.nav:hover {<br />color: #ffffcc;<br />font-size: 13px;<br />font-weight: bolder;<br />text-decoration: underline overline;<br />}<br /><br />a.bot:link {<br />color: #ffffcc;<br />font-size: 11px;<br />font-weight: bolder;<br />text-decoration: none;<br />}<br /><br />a.bot:visited {<br />color: #ffffcc;<br />font-size: 11px;<br />font-weight: bolder;<br />text-decoration: none;<br />}<br /><br />a.bot:hover {<br />color: #ffffcc;<br />font-size: 11px;<br />font-weight: bolder;<br />text-decoration: underline overline;<br />}<br /><br />a.gal:link {<br />display: inline-block;<br />color: #990033;<br />font-weight: bolder;<br />padding: 5px;<br />text-decoration: none<br />}<br /><br />a.gal:visited {<br />display: inline-block;<br />color: #990033;<br />font-weight: bolder;<br />padding: 5px;<br />text-decoration: none<br />}<br /><br />a.gal:hover {<br />display: inline-block;<br />color: #339900;<br />font-weight: bolder;<br />padding: 5px;<br />text-decoration: underline overline<br />}<br /><br />a:link {<br />color: #000000;<br />font-size: 12px;<br />font-weight: bolder;<br />text-decoration: none;<br />}<br /><br />a:visited {<br />color: #000000;<br />font-size: 12px;<br />font-weight: bolder;<br />text-decoration: none;<br />}<br /><br />a:hover {<br />color: #339900;<br />font-size: 12px;<br />font-weight: bolder;<br />text-decoration: underline overline;<br />}<br /><br />#menu {<br />list-style-type: none;<br />margin: 0px;<br />padding: 0px;<br />}<br /><br />#index #indexn, #lights #lightsn, #archive #archiven, #about #aboutn, #layout #layoutn, #news #newsn, #gallery #galleryn{<br />background-color: #ffaaaa;<br />margin-left: 10px;<br />padding: 3px;<br />border: solid 1px #ffffcc;<br />}<br /><br />#index #indexn a.nav, #lights #lightsn a.nav, #archive #archiven a.nav, #about #aboutn a.nav, #layout #layoutn a.nav, #news #newsn a.nav, #gallery #galleryn a.nav {<br />color: #990033;<br />font-size: 13px;<br />font-weight: 900;<br />text-decoration: none;<br />}<br /><br />#buildingbaseboard #buildingbaseboardn, #electronics #electronicsn, #fittingpointsmotors #fittingpointsmotorsn, #general #generaln, #lightingeurostar #lightingeurostarn, #makingtrackplan #makingtrackplann, #nighttime #nighttimen, #preparingloft #preparingloftn, #scenery #sceneryn, #trackcleaning #trackcleaningn {<br />display: inline-block;<br />color: #ffffcc;<br />font-weight: bolder;<br />text-decoration: none;<br />padding: 5px;<br />background-color: #990033;<br />}<br /><br />#menu li {<br />background-color: #990033;<br />margin-left: 10px;<br />padding: 3px;<br />border: solid 1px #ffffcc;<br />}<br /><br />#nav {<br />list-style-type: none;<br />margin: 0px;<br />padding: 0px;<br />}<br /><br />#nav li {<br />margin-left: 10px;<br />padding: 10px;<br />color: #000000;<br />font-size: 16px;<br />font-weight: bold;<br />text-decoration: none;<br />}<br /><br />#connect {<br />list-style-type: none;<br />margin-top: 1em;<br />padding: 0px;<br />}<br /><br />#connect li {<br />margin-left: 10px;<br />text-align: center;<br />color: #000000;<br />font-size: 16px;<br />font-weight: bold;<br />text-decoration: none;<br />}<br /><br />#connect li img {<br />display: inline;<br />padding: 5px;<br />vertical-align: middle;<br />}<br /><br />body {<br />color: black;<br />font-size: 12px;<br />font-family: calibri, arial, sans-serif;<br />background-color: #990033;<br />margin: 5%;<br />}<br /><br />table { <br />color: black;<br />font-size: 12px;<br />font-family: calibri, arial, sans-serif;<br />empty-cells: show;<br />border-collapse: collapse;<br />margin: 0px auto;<br />width: 99%;<br />} <br /><br />td {<br />color: black;<br />font-size: 12px;<br />font-family: calibri, arial, sans-serif;<br />border: 2px solid black;<br />}<br />.w70 {<br />width: 70%;<br />}<br />.w25 {<br />width: 25%;<br />border: none;<br />padding-top: 0px;<br />padding-bottom: 0px;<br />padding-left: 10px;<br />padding-right: 10px;<br />text-align:center;<br />}<br />.w33 {<br />width: 33%;<br />border: none;<br />padding-top: 0px;<br />padding-bottom: 0px;<br />padding-left: 10px;<br />padding-right: 10px;<br />text-align:center;<br />}<br />.w15 {<br />width: 15%;<br />text-align: center;<br />}<br />.add {<br />width: 20%;<br />text-align: center;<br />border: none;<br />}<br /><br />th {<br />color: black;<br />font-size: 12px;<br />font-family: calibri, arial, sans-serif;<br />font-weight: bold;<br />font-style: italic;<br />text-align: center;<br />border: 2px solid black;<br />}<br /><br />h1, h2, h3, h4, h5, h6 {<br />margin-top: 12px;<br />margin-bottom: 12px;<br />padding: 0px;<br />}<br /><br />div.container {<br />line-height: 150%;<br />background-color: #ffffcc;<br />margin: 0;<br />width: 100%;<br />}<br /><br />div.header {<br />color: black;<br />padding-top: 20px;<br />padding-bottom: 0px;<br />padding-left: 20px;<br />padding-right: 20px;<br />clear: left;<br />}<br /><br />div.nav {<br />text-align: center;<br />margin: 0px;<br />padding: 1em;<br />width: 160px;<br />float: left;<br />}<br /><br />div.right {<br />text-align: center;<br />margin: 0px;<br />padding: 1em;<br />width: 160px;<br />float: right;<br />}<br /><br />div.main {<br />padding-left: 195px;<br />padding-right: 190px;<br />padding-top: 15px;<br />}<br /><br />div.footer {<br />padding: 20px;<br />clear: both;<br />}<br /><br />div.footerbox {<br />padding: 8px;<br />clear: both;<br />background: #990033;<br />border: 2px inset #ffffcc;<br />font-family: calibri, arial, sans-serif;<br />font-size: 11px;<br />color: #ffffcc;<br />line-height: 120%;<br />width: 305px;<br />text-align: center;<br />margin: 0px auto;<br />}<br /><br />div.gal {<br />font-family: Calibri, arial, sans-serif;<br />font-size: 13px;<br />color: #000000;<br />line-height: 120%;<br />width: 85%;<br />text-align: center;<br />padding: 5px;<br />margin: 0px auto<br />}<br /><br />img {<br />display: block;<br />margin: auto;<br />border-width: 0px;<br />}<br /><br />img.imggalnav {<br />display: inline;<br />margin: 5px;<br />border-width: 0px;<br />}<br /><br />p {<br />font-family: calibri, arial, sans-serif;<br />text-align: justify;<br />font-size: 12px;<br />}<br /><br />p.browser {<br />border: 2px dashed #990033;<br />color: #990033;<br />font-weight: bolder;<br />text-decoration: none;<br />padding: 5px;<br />}<br /><br />p.nav {<br />padding-left: 10px;<br />}<br /><br />p.ref {<br />margin-bottom: 0px;<br />font-family: calibri, arial, sans-serif;<br />font-style: oblique;<br />font-weight: bold;<br />color: #666666;<br />text-align: center;<br />font-size: 12px;<br />}<br /><br />p.gal {<br />margin-top: 0px;<br />margin-bottom: 15px;<br />margin-left: 0px;<br />margin-right: 0px;<br />font-family: calibri, arial, sans-serif;<br />font-style: oblique;<br />font-weight: bold;<br />color: #666666;<br />text-align: center;<br />font-size: 12px;<br />}<br /><br />pre {<br />font-family: calibri, arial, sans-serif;<br />}</div><br />When I add "#gallery #galleryn" to this line: "#buildingbaseboard #buildingbaseboardn, #electronics #electronicsn, #fittingpointsmotors #fittingpointsmotorsn, #general #generaln, #lightingeurostar #lightingeurostarn, #makingtrackplan #makingtrackplann, #nighttime #nighttimen, #preparingloft #preparingloftn, #scenery #sceneryn, #trackcleaning #trackcleaningn {" everything goes all funny, I can only assume because ive used those IDs before?<br /><br />How do I get around this? Any help would be greatly appreciated <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Grab x number of words before and after a given keyword?]]></title>
<link>http://www.globberstack.com/Questions/grab-x-number-of-words-before-and-after-a-given-keyword-1/</link>
<comments>http://www.globberstack.com/Questions/grab-x-number-of-words-before-and-after-a-given-keyword-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:08:11 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/grab-x-number-of-words-before-and-after-a-given-keyword-1/</guid>
<description><![CDATA[<br />            <p>How can I go about grabbing [x] number of words before and after a given keyword in a string in PHP? I am trying to tokenize results from a mysql query tailored to the keyword as a snippet.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/444351" rel="nofollow">Jaime Cross</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[horizontal menu with images and rollover states]]></title>
<link>http://www.globberstack.com/Questions/horizontal-menu-with-images-and-rollover-states-1/</link>
<comments>http://www.globberstack.com/Questions/horizontal-menu-with-images-and-rollover-states-1/</comments>
<pubDate>Fri, 10 Sep 2010 09:02:33 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/horizontal-menu-with-images-and-rollover-states-1/</guid>
<description><![CDATA[I'm so frustrated, I'm beginning to wonder if I should just abandon my grand plans for a cool website and try something like Wordpress ... I'm just not sure that would be any easier or allow me the freedom to do everything I want to do.  Disclaimer: I'm teaching myself CSS, and I'm not any sort of scripter.  I'm only touching web dev because I want to redesign my website.  <br /><br />Okay.  I know how to make a simple horizontal menu using HTML and CSS.  But instead of using text, I would like to use images.  Each link on the menu is represented by one of three images.  Image1A for the active page, Image1B for a link, and Image1C for hover.  When the user looks at the menu, there will only be one Image in the "A" state (and that is the page they are currently on).  The other image links will be in the "B" state unless hovered over, in which case they go to the "C" state. <br /><br />I've tried a ton of tutorials, and not a single one works for what I'm trying to do ... which should be simple and easy, but apparently it's not.  I've checked out source code from other websites, but it looks either too complicated or too different from what I'm doing.<br /><br />I'd link to my site, but I don't want to make this page live yet, since it looks like crap. <br /><br />Suggestions and advice would be much appreciated.<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Bottom not lining up correct - Help Please]]></title>
<link>http://www.globberstack.com/Questions/bottom-not-lining-up-correct-help-please-1/</link>
<comments>http://www.globberstack.com/Questions/bottom-not-lining-up-correct-help-please-1/</comments>
<pubDate>Fri, 10 Sep 2010 08:59:35 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/bottom-not-lining-up-correct-help-please-1/</guid>
<description><![CDATA[Hello, <br /><br />I wanted to switch a index page from html tables to css and after three days of crawling in the corner and eating my hair I am finally getting closer to what I want however the bottom is not lining up correct. No matter how much I tweak with height of the section it is does not change or something... I am very lost on this one. Logically the change the height changes the height of the section.  I also messed with the height in the body codes but that did not help either.<br /><br />Here is the page: <a href="http://www.momsbreak.com/" target="_blank">http://www.momsbreak.com/</a><br /><br />Codes I can't seem to fix correctly.<br /><br />/* Articles */<br />#container3 {<br />	width: 900px;<br />	margin-top: 10px;<br />	margin-left: 0px;<br />	margin-right: 0px;<br />	text-align: left;<br />	margin-left: auto;<br />	margin-right: auto;<br />	height: 3500px;<br />}<br />#page_content3 {<br />	border: thick #68647B dashed;<br />	background-color: #FFFFFF;<br />	font-family: Arial, Helvetica, sans-serif;<br />	font-size: medium;<br />	font-weight: normal;<br />	padding-left: 20px;<br />	padding-right: 20px;<br />	padding-top: 20px;<br />	height: 3500px;<br />	padding-bottom: 20px;<br />}<br /><br /><br />Any help is much appreciated.<br />Kimber  <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Update Framework for PHP]]></title>
<link>http://www.globberstack.com/Questions/update-framework-for-php-1/</link>
<comments>http://www.globberstack.com/Questions/update-framework-for-php-1/</comments>
<pubDate>Fri, 10 Sep 2010 08:59:05 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/update-framework-for-php-1/</guid>
<description><![CDATA[<br />            <p>Does anyone know of a framework (written in PHP) to update PHP-based software ?</p><br /><br /><p>I'm thinking of a library that assists in checking for updates online and that provides methods for generating, downloading, verifying and installing update packages, maybe even with encryption and public-key signatures.</p><br /><br /><p>Ideally with a non-copyleft open source license (e.g. BSD or MIT License, no GPL).</p><br /><br /><p>While source control tools are nice in theory, they can complicate (initial) deployment of PHP applications as they are not PHP-based (limits portability) and are often quite large.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/419404" rel="nofollow">Archimedix</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[How to run a shell command through PHP code?]]></title>
<link>http://www.globberstack.com/Questions/how-to-run-a-shell-command-through-php-code-1/</link>
<comments>http://www.globberstack.com/Questions/how-to-run-a-shell-command-through-php-code-1/</comments>
<pubDate>Fri, 10 Sep 2010 08:57:06 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-to-run-a-shell-command-through-php-code-1/</guid>
<description><![CDATA[<br />            <p>Hello Experts,<br />I am trying to run a Jar file in the backend of my php code.But I am not getting the desired output to it.There is a jar file which runs in the background and returns the Page Rank of any of the  keyword and Domain given to it.<br />I am attaching the code,please suggest me any solution to it,because when I run it on the terminal,it is giving correct output.</p><br /><br /><p>Here is the Code :</p><br /><br /><pre><code>    &lt;?php<br />set_time_limit(0);<br />function returnJarPath()<br />{<br />    $jarPath = $_SERVER['DOCUMENT_ROOT'] . "myFolder/tools_new/includes/Rank.jar";<br />    return $jarPath;<br />}<br />$jar = returnJarPath();<br />$command = "java -jar $jar aspdotnet/microsoft.com";//Passing the Argument to the Jar file.<br /><br /><br />$shellOutput = shell_exec($command);<br />    print "The Shell Output is : " ; var_dump($shellOutput);print "&lt;br /&gt;";<br />exec($command,$executeCommmand);<br />    print "The Exec returns the value : " ; var_dump($executeCommmand);print "&lt;br /&gt;";<br />passthru($command,$passthruCommand);<br />    print "The Passthru returns the value : " . $passthruCommand. "&lt;br /&gt;";<br />?&gt;<br /></code></pre><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/153094" rel="nofollow">Nishant Shrivastava</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[filter specific string in php]]></title>
<link>http://www.globberstack.com/Questions/filter-specific-string-in-php-1/</link>
<comments>http://www.globberstack.com/Questions/filter-specific-string-in-php-1/</comments>
<pubDate>Fri, 10 Sep 2010 08:53:47 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/filter-specific-string-in-php-1/</guid>
<description><![CDATA[<br />            <p>hello i have string like</p><br /><br /><pre><code>$var="UseCountry=1<br />UseCountryDefault=1<br />UseState=1<br />UseStateDefault=1<br />UseLocality=1<br />UseLocalityDefault=1<br />cantidad_productos=5<br />expireDays=5<br />apikey=ABQIAAAAFHktBEXrHnX108wOdzd3aBTupK1kJuoJNBHuh0laPBvYXhjzZxR0qkeXcGC_0Dxf4UMhkR7ZNb04dQ<br />distancia=15<br />AutoCoord=1<br />user_add_locality=0<br />SaveContactForm=0<br />ShowVoteRating=0<br />Listlayout=0<br />WidthThumbs=100<br />HeightThumbs=75<br />WidthImage=640<br />HeightImage=480<br />ShowImagesSystem=1<br />ShowOrderBy=0<br />ShowOrderByDefault=0<br />ShowOrderDefault=DESC<br />SimbolPrice=$<br />PositionPrice=0<br />FormatPrice=0<br />ShowLogoAgent=1<br />ShowReferenceInList=1<br />ShowCategoryInList=1<br />ShowTypeInList=1<br />ShowAddressInList=1<br />ShowContactLink=1<br />ShowMapLink=1<br />ShowAddShortListLink=1<br />ShowViewPropertiesAgentLink=1<br />ThumbsInAccordion=5<br />WidthThumbsAccordion=100<br />HeightThumbsAccordion=75<br />ShowFeaturesInList=1<br />ShowAllParentCategory=0<br />AmountPanel=<br />AmountForRegistered=5<br />RegisteredAutoPublish=1<br />AmountForAuthor=5<br />AmountForEditor=5<br />AmountForPublisher=5<br />AmountForManager=5<br />AmountForAdministrator=5<br />AutoPublish=1<br />MailAdminPublish=1<br />DetailLayout=0<br />ActivarTabs=0<br />ActivarDescripcion=1<br />ActivarDetails=1<br />ActivarVideo=1<br />ActivarPanoramica=1<br />ActivarContactar=1<br />ContactMailFormat=1<br />ActivarReservas=1<br />ActivarMapa=1<br />ShowImagesSystemDetail=1<br />WidthThumbsDetail=120<br />HeightThumbsDetail=90<br />idCountryDefault=1<br />idStateDefault=1<br />ms_country=1<br />ms_state=1<br />ms_locality=1<br />ms_category=1<br />ms_Subcategory=1<br />ms_type=1<br />ms_price=1<br />ms_bedrooms=1<br />ms_bathrooms=1<br />ms_parking=1<br />ShowTextSearch=1<br />minprice=<br />maxprice=<br />ms_catradius=1<br />idcatradius1=<br />idcatradius2=<br />ShowTotalResult=1<br />md_country=1<br />md_state=1<br />md_locality=1<br />md_category=1<br />md_type=1<br />showComments=0<br />useComment2=0<br />useComment3=0<br />useComment4=0<br />useComment5=0<br />AmountMonthsCalendar=3<br />StartYearCalendar=2009<br />StartMonthCalendar=1<br />PeriodOnlyWeeks=0<br />PeriodAmount=3<br />PeriodStartDay=1<br />apikey=ABQIAAAAJ879Hg7OSEKVrRKc2YHjixSmyv5A3ewe40XW2YiIN-ybtu7KLRQiVUIEW3WsL8vOtIeTFIVUXDOAcQ<br />";<br /></code></pre><br /><br /><p>in that string only i want <code>"api==ABQIAAAAJ879Hg7OSEKVrRKc2YHjixSmyv5A3ewe40XW2YiIN-ybtu7KLRQiVUIEW3WsL8vOtIeTFIVUXDOAcQ";</code><br /> plz guide me correctly; </p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/441423" rel="nofollow">hardik55</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Parsing a JSON object with jQuery and creating two drop down lists with that data]]></title>
<link>http://www.globberstack.com/Questions/parsing-a-json-object-with-jquery-and-creating-two-drop-down-lists-with-that-data-1/</link>
<comments>http://www.globberstack.com/Questions/parsing-a-json-object-with-jquery-and-creating-two-drop-down-lists-with-that-data-1/</comments>
<pubDate>Fri, 10 Sep 2010 08:47:37 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/parsing-a-json-object-with-jquery-and-creating-two-drop-down-lists-with-that-data-1/</guid>
<description><![CDATA[<br />            <p>Hi guys, I am trying to dynamically create two drop down lists, one will be provinces, and the other will contain the cities of each province, so when a user chooses a province, the cities drop down will populate, I am using jQuery's $.ajax funtion to get the data from a database which then passes it back as JSON, here is what I have thus far, </p><br /><br /><p>jQuery:</p><br /><br /><pre><code>$.getJSON("provinces.php", function(data){<br /><br />//clean out the select list<br />$('#province').html('');<br /><br />    //run the loop to populate the province drop down list<br />    $.each(data, function(i, json) {<br />        var province = json.province;<br />        var cities = json.cities;<br /><br />        $('#province').append(<br />            $('&lt;option&gt;&lt;/option&gt;').html(province)<br />        );<br /><br />    });<br />});<br /></code></pre><br /><br /><p>a snippit of the JSON:</p><br /><br /><pre><code>[<br /> {"province":"Eastern Cape","cities":"Mthatha,Njoli,Port Alfred,Port Elizabeth,Queenstown,Uitenhage"},<br /> {"province":"Freestate","cities":"Thaba Nchu,Virginia,Welkom"}<br />]<br /></code></pre><br /><br /><p>I am populating the provinces drop down, but not the cities drop down.</p><br /><br /><p>I would like to hear from you guys what you think the best method will be to achieve the cities drop down.</p><br /><br /><p>Thanx in advance!</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/270311" rel="nofollow">kielie</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Passing a propel criteria to the symfony routing function that retrieves the object]]></title>
<link>http://www.globberstack.com/Questions/passing-a-propel-criteria-to-the-symfony-routing-function-that-retrieves-the-object-1/</link>
<comments>http://www.globberstack.com/Questions/passing-a-propel-criteria-to-the-symfony-routing-function-that-retrieves-the-object-1/</comments>
<pubDate>Fri, 10 Sep 2010 08:46:43 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/passing-a-propel-criteria-to-the-symfony-routing-function-that-retrieves-the-object-1/</guid>
<description><![CDATA[<br />            <p>Hi guys, quick symfony / propel question.<br />I have the following propel collection route:</p><br /><br /><pre><code>api_offer:<br />  class: sfPropelRouteCollection<br />  options:<br />    prefix_path: /api/offer<br />    model: Offer<br />    plural: offers<br />    singluar: offer<br />    actions: [ list ]<br />    module: apiOffer<br />  requirements:<br />    sf_format: (?:html|json)<br /></code></pre><br /><br /><p>My question is, does anyone know of a way to pass a Criteria to the $this->getRoute()->getObjects(); in the action? Basically I need to retrieve different objects from the database depending on existing parameters in the route.</p><br /><br /><p>Thanks for all you help.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/335505" rel="nofollow">vincent</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[topis research]]></title>
<link>http://www.globberstack.com/Questions/topis-research-1/</link>
<comments>http://www.globberstack.com/Questions/topis-research-1/</comments>
<pubDate>Fri, 10 Sep 2010 08:46:08 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/topis-research-1/</guid>
<description><![CDATA[Can someone please give me alink to a tutorial that would be atleast be close to the following<br />navigation bar created out of an image. (done)<br /><br />on the hovers effect on each category, a drop down menu will appear. That is all I want. The turorials I have found so far are either too complex or too basic and do not use images.<br />I would appreciate any help I can get.<br /><br />I basically trying to learn how to create the drop down box and set shape it the way I want.<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[What is the best way to lay out my CMS?]]></title>
<link>http://www.globberstack.com/Questions/what-is-the-best-way-to-lay-out-my-cms-1/</link>
<comments>http://www.globberstack.com/Questions/what-is-the-best-way-to-lay-out-my-cms-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:43:52 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/what-is-the-best-way-to-lay-out-my-cms-1/</guid>
<description><![CDATA[<br />            <p>Basically once the user is logged in they will be able to edit a news article and the image gallery and pdf's which will be attached to it, the image galleries can be used in multiple news articles so can the pdf's - so what is the best way to lay the CMS out?</p><br /><br /><p>I should have mentioned that I'm building the entire website using Codeigniter so want to build my own CMS - just really wanted some ideas on the best way to lay the CMS out.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/443442" rel="nofollow">newbie</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Notify user his password has been changed via text message on the same page (with PHP or AJAX?)]]></title>
<link>http://www.globberstack.com/Questions/notify-user-his-password-has-been-changed-via-text-message-on-the-same-page-with-php-or-ajax-1/</link>
<comments>http://www.globberstack.com/Questions/notify-user-his-password-has-been-changed-via-text-message-on-the-same-page-with-php-or-ajax-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:38:41 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/notify-user-his-password-has-been-changed-via-text-message-on-the-same-page-with-php-or-ajax-1/</guid>
<description><![CDATA[<br />            <p>Hi guys,</p><br /><br /><p>Here is the scenario. A user wants to change his password. So he login and fill up his new desired password and clicked submit. Back end PHP checks his codes and updated it in MySQL database. User is brought back to the same page (with the form) and is notified by this small paragraph sitting on the top of the page that his password has been changed successfully.</p><br /><br /><p>Is it possbile to do this with PHP only (without jQuery)?</p><br /><br /><p>Apologies if I had phrased my question poorly.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/412801" rel="nofollow">dave</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Installing Postfix without MySQL? (all I want is to send mail from Django/PHP)]]></title>
<link>http://www.globberstack.com/Questions/installing-postfix-without-mysql-all-i-want-is-to-send-mail-from-djangophp-1/</link>
<comments>http://www.globberstack.com/Questions/installing-postfix-without-mysql-all-i-want-is-to-send-mail-from-djangophp-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:38:36 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/installing-postfix-without-mysql-all-i-want-is-to-send-mail-from-djangophp-1/</guid>
<description><![CDATA[<br />            <p>I'm currently setting up two servers, one for me and one for a client. Mine is purely a Django server with no PHP in sight. The other is a PHP server with no Django in sight. They are both VPSs with Ubuntu Server 10.04 Lucid on them.</p><br /><br /><p>Both require some sort of mail server so the Django and PHP applications can send mail from the server. Both servers don't require email accounts as I do these with Google Apps For Domains. I merely want a solution for letting these technologies send mail, in a way that is totally standard. (no funny send mail setups or anything...)</p><br /><br /><p>I was told Postfix is the way to go for email servers. But everywhere I see that it should have MySQL as well. Is this the only way to have a functional Postfix server? Though my client's PHP server will have MySQL anyhow (as it will be hosting the PHP based Simple Machines Forum), my Django server will be using PostgreSQL throughout. And the idea of installing MySQL just for Postfix there seems over the top for me.</p><br /><br /><p>Is there other solutions out there? Am I looking at this all wrong? Is there maybe other solutions that would fill this need?</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/86128" rel="nofollow">littlejim84</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[How to use dbdeploy with SQL Server?]]></title>
<link>http://www.globberstack.com/Questions/how-to-use-dbdeploy-with-sql-server-1/</link>
<comments>http://www.globberstack.com/Questions/how-to-use-dbdeploy-with-sql-server-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:38:32 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-to-use-dbdeploy-with-sql-server-1/</guid>
<description><![CDATA[<br />            <p>Guys,</p><br /><br /><p>I need help in setting up dbdeploy for my SQL Server database and MySQL Server.</p><br /><br /><p>The example in the dbdeploy website does not tell me how to set the drivers for SQL Server and MySQL. Am a bit lost.</p><br /><br /><p>Sample scripts will be appreciated.</p><br /><br /><p>Thanks</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/26143" rel="nofollow">gath</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[PHP Dynamic Drop Down Menu Error]]></title>
<link>http://www.globberstack.com/Questions/php-dynamic-drop-down-menu-error-1/</link>
<comments>http://www.globberstack.com/Questions/php-dynamic-drop-down-menu-error-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:37:31 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/php-dynamic-drop-down-menu-error-1/</guid>
<description><![CDATA[<br />            <p>Hi There! I am trying to script a simple dynamic drop down menu showing the tables that exist within my database using PHP 5. I currently have 2 tables installed in my MySQL database.</p><br /><br /><p>I have managed to run the script without problem with the menu showing up on my browser however the menu shows 2 entries but they have no words! The menu just contains 2 blank entries once I click the arrow button.</p><br /><br /><p>The script is shown below:</p><br /><br /><pre><code>&lt;?php<br />include "db_connect.php";<br />{<br />?&gt;<br />&lt;td valign=top&gt;&lt;strong&gt;Name:&lt;/strong&gt;&lt;/td&gt;<br />&lt;td&gt;<br />&lt;?php<br />echo "&lt;select name=\"name\"&gt;"; <br />echo "&lt;option size =30 selected&gt;Select&lt;/option&gt;";<br /><br />$result = mysql_query("show tables");<br /><br />if(!$result) trigger_error("Query Failed: ".  mysql_error($db), E_USER_ERROR);<br /><br />if(mysql_num_rows($result)) <br />{ <br />while($table_array = mysql_fetch_assoc($result)) <br />{ <br />    echo "&lt;option&gt;$table_array[0]&lt;/option&gt;"; <br />} <br />} <br />else <br />{<br />echo "&lt;option&gt;No Names Present&lt;/option&gt;";  <br />} <br /><br />}<br />?&gt;<br />&lt;/td&gt;<br /></code></pre><br /><br /><p>Please do help pr give suggestions. Thanks.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/411517" rel="nofollow">JavaNoob</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[cronjob delaying based on PHP output]]></title>
<link>http://www.globberstack.com/Questions/cronjob-delaying-based-on-php-output-1/</link>
<comments>http://www.globberstack.com/Questions/cronjob-delaying-based-on-php-output-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:33:05 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/cronjob-delaying-based-on-php-output-1/</guid>
<description><![CDATA[<br />            <p>I'm in charge of a printer, so I wrote a script which runs every 5 minutes and figures out if the printer has paper. If it doesn't, the script will text me.  The problem is, if I'm busy, and can't fill the printer, I don't want the script to continue to text me every 5 minutes.  Is there a way I can force it to only send me at most 1 text every 8 hours or so, to ensure that the script doesn't text me twice for the same out-of-paper situation?  The only thing I can currently think of is to create a db of times that I get texts, then make sure that the most recent one wasn't too long ago, or to create a local file with the most recent time in it.</p><br /><br /><p>Thanks!</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/365568" rel="nofollow">codersarepeople</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[echo json_encode with 2 variables with jquery form plugin]]></title>
<link>http://www.globberstack.com/Questions/echo-json-encode-with-2-variables-with-jquery-form-plugin-1/</link>
<comments>http://www.globberstack.com/Questions/echo-json-encode-with-2-variables-with-jquery-form-plugin-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:29:07 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/echo-json-encode-with-2-variables-with-jquery-form-plugin-1/</guid>
<description><![CDATA[<br />            <p>code inside php file:</p><br /><br /><pre><code>$variable1 = array( 'variable1' =&gt; "$variable1" );<br />      $variable2 = array( 'variable2' =&gt; "$variable2" );<br />            echo json_encode ($variable1);<br /></code></pre><br /><br /><p>code inside main page:</p><br /><br /><pre><code>&lt;span id="variable1"&gt;&lt;/span&gt;<br />&lt;span id="variable2"&gt;&lt;/span&gt;<br /></code></pre><br /><br /><p>I am trying to make it so it echos both variables in their spans.<br />doing 2 echos does not work, but the single as coded above works</p><br /><br /><p>using the jquery form plugin for this.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/428492" rel="nofollow">Jamie</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Solved: Need recommendations of Word Press Themes]]></title>
<link>http://www.globberstack.com/Questions/solved-need-recommendations-of-word-press-themes-1/</link>
<comments>http://www.globberstack.com/Questions/solved-need-recommendations-of-word-press-themes-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:16:09 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/solved-need-recommendations-of-word-press-themes-1/</guid>
<description><![CDATA[I'm hoping you can suggest Word Press themes to consider. I'm upgrading & expanding a corporate site, for a specialty pharmacy (retail). The existing site (created by someone else) is only 4 pages, but I'm working on lots of new content. I do...<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[What's the fastest way to poll a MySQL table for new rows?]]></title>
<link>http://www.globberstack.com/Questions/whats-the-fastest-way-to-poll-a-mysql-table-for-new-rows-1/</link>
<comments>http://www.globberstack.com/Questions/whats-the-fastest-way-to-poll-a-mysql-table-for-new-rows-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:12:08 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/whats-the-fastest-way-to-poll-a-mysql-table-for-new-rows-1/</guid>
<description><![CDATA[<br />            <p>My application needs to poll a MySQL database for new rows. Every time new rows are added, they should be retrieved. I was thinking of creating a trigger to place references to new rows on a separate table. The original table has over 300,000 rows.</p><br /><br /><p>The application is built in PHP.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/157837" rel="nofollow">gAMBOOKa</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[what's best way to backup databases]]></title>
<link>http://www.globberstack.com/Questions/whats-best-way-to-backup-databases-1/</link>
<comments>http://www.globberstack.com/Questions/whats-best-way-to-backup-databases-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:11:24 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/whats-best-way-to-backup-databases-1/</guid>
<description><![CDATA[I'm running my localhost site using XAMMP - want to know the best way to back up my several databases ?<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Uncaught Exception 'PDOException' with message 'SQLSTATE[HY000] [2003] Can't connect to MySQL server]]></title>
<link>http://www.globberstack.com/Questions/uncaught-exception-pdoexception-with-message-sqlstatehy000-2003-cant-connect-to-mysql-server-1/</link>
<comments>http://www.globberstack.com/Questions/uncaught-exception-pdoexception-with-message-sqlstatehy000-2003-cant-connect-to-mysql-server-1/</comments>
<pubDate>Thu, 09 Sep 2010 09:00:17 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/uncaught-exception-pdoexception-with-message-sqlstatehy000-2003-cant-connect-to-mysql-server-1/</guid>
<description><![CDATA[<br />            <p>Hi, I am using Zend Framework and my application works on localhost but produces the can't connect to MySQL server error when I'm trying to connect to the database I've uploaded on a live server. I've tried handling exceptions and Zend_Exception catches it("perhaps factory() failed to load the specified Adapter class"). I've emailed the webmaster and he told me that Phpmyadmin is working fine so there should be no problem with connecting php to mysql. What else can I do? The lines that produces the error are the following:</p><br /><br /><pre><code>    $db = Zend_Registry::get('db');<br />    $sql = 'SELECT * FROM department';<br />    $result = $db-&gt;fetchAll($sql);  <br /></code></pre><br /><br /><p>Is there something specific I can ask the webmaster to look at?</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/429148" rel="nofollow">user429148</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[How to force MySQL to take 0 as a valid auto-increment value]]></title>
<link>http://www.globberstack.com/Questions/how-to-force-mysql-to-take-0-as-a-valid-auto-increment-value-1/</link>
<comments>http://www.globberstack.com/Questions/how-to-force-mysql-to-take-0-as-a-valid-auto-increment-value-1/</comments>
<pubDate>Thu, 09 Sep 2010 08:58:14 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-to-force-mysql-to-take-0-as-a-valid-auto-increment-value-1/</guid>
<description><![CDATA[<br />            <p>Long story short, I have a SQL file that I want to import as a <code>skel</code> style file, so this will be done repeatedly, programmatically. I can edit the SQL file however I want, but I'd rather not touch the application itself.</p><br /><br /><p>This application uses <code>userid = 0</code> to represent the anonymous user. It also has a relevant (blank) entry in the database to represent this 'user'. Hence, the line in my <code>skel.sql</code> looks something like this:</p><br /><br /><pre><code>INSERT INTO `{{TABLE_PREFIX}}users` VALUES (0, '', '', '', 0, 0, 0, '', '', 0, 0, 0, 0, 0, NULL, '', '', '', NULL);<br /></code></pre><br /><br /><p>The problem with this is that <code>uid</code> is a <code>auto_increment</code> field, for which, technically, <code>0</code> is an invalid value. Or atleast, if you set it to 0, you're basically telling MySQL, "Please insert the next id into this field."</p><br /><br /><p>Now, I suppose I could put an <code>INSERT</code> then an <code>UPDATE</code> query into my SQL file, but is there a way of telling MySQL in general that yes, I actually want to insert <code>0</code> into this field?</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/15537" rel="nofollow">Matthew Scharley</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Current URI Segment in CodeIgniter]]></title>
<link>http://www.globberstack.com/Questions/current-uri-segment-in-codeigniter-1/</link>
<comments>http://www.globberstack.com/Questions/current-uri-segment-in-codeigniter-1/</comments>
<pubDate>Thu, 09 Sep 2010 08:54:57 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/current-uri-segment-in-codeigniter-1/</guid>
<description><![CDATA[<br />            <p>What would be the best way to check for the current URI segment in a CodeIgniter view?  What I am trying to do is use the current URI segment [i.e. $this->uri->segment(1)] in order to highlight the current page on the navigation bar.</p><br /><br /><p>The best that I have figured out is to do</p><br /><br /><p>$data['current_uri'] = $this->uri->segment(1);<br />$this->load->view('header', $data);</p><br /><br /><p>in each of my controllers and then in the header.php file, I check the $current_uri variable to determine which part of the navigation should be highlighted.  As you know, this is a very tedious way of doing it, but I'm at a loss of a better way to do this.</p><br /><br /><p>It may even be possible to extend the default Controller class to pass the current URI segment, but I'm not sure if this would work, or even how to go about doing it.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/406800" rel="nofollow">Jared</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Firefox Displays Page But Not Safari]]></title>
<link>http://www.globberstack.com/Questions/firefox-displays-page-but-not-safari-1/</link>
<comments>http://www.globberstack.com/Questions/firefox-displays-page-but-not-safari-1/</comments>
<pubDate>Thu, 09 Sep 2010 08:51:53 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/firefox-displays-page-but-not-safari-1/</guid>
<description><![CDATA[Hi, I am very new to working with websites.  For some reason, Firefox displays the webpage --http://www.eeb.cornell.edu/winkler/cv.html -- but Safari does not.  I am using a MAC OS 10.6 and Dreamweaver CS3.  Can anyone help solve the problem? Thanks very much.<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Best way to store user permissions?]]></title>
<link>http://www.globberstack.com/Questions/best-way-to-store-user-permissions-1/</link>
<comments>http://www.globberstack.com/Questions/best-way-to-store-user-permissions-1/</comments>
<pubDate>Thu, 09 Sep 2010 08:51:09 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/best-way-to-store-user-permissions-1/</guid>
<description><![CDATA[<br />            <p>Hey all,</p><br /><br /><p>Designing a fairly complicated site with a lot of ajax running on a single page. I have reached the point where some user's need to have specific permission to do things and some need to be stopped from the action. I have set up user roles in my database and all is working fine, but I wonder if there is an easier/safer method for me to store each permission.</p><br /><br /><p>Currently, when a user logs in their specific permissions are grabbed from the db and loaded into a session array. To check if the user has permission, I simply check to see if the permission is contained in the array. This seems sluggish, and almost like I am missing a better solution.</p><br /><br /><p>Also, sessions can apparently be edited by the user... is there a safer method?</p><br /><br /><p>I have thought running a query for each check, but that could greatly increase the load time for a simple ajax request.</p><br /><br /><p>I am open to any and all ideas. Thanks.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/387800" rel="nofollow">Capt Otis</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Using an HTML checkbox to put 1 or 0 into a MySQL table]]></title>
<link>http://www.globberstack.com/Questions/using-an-html-checkbox-to-put-1-or-0-into-a-mysql-table-1/</link>
<comments>http://www.globberstack.com/Questions/using-an-html-checkbox-to-put-1-or-0-into-a-mysql-table-1/</comments>
<pubDate>Thu, 09 Sep 2010 08:49:44 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/using-an-html-checkbox-to-put-1-or-0-into-a-mysql-table-1/</guid>
<description><![CDATA[<br />            <p>Hello,</p><br /><br /><p>I am using a simple HTML checkbox in a form to put a 1 for checked and a 0 for unchecked in a field called "subcheck" in a MySQL table.</p><br /><br /><p>Does the checkbox default to 1 for "checked" and 0 for unchecked?  If not, how can I give it those values?</p><br /><br /><p>Thanks in advance,</p><br /><br /><p>John</p><br /><br /><p>Form:</p><br /><br /><pre><code>&lt;div class="subcheck"&gt;&lt;INPUT TYPE=CHECKBOX NAME="subcheck"&gt;Click here to receive free money in the mail.&lt;P&gt;&lt;/div&gt;<br /></code></pre><br /><br /><p>In the file the form goes to:</p><br /><br /><pre><code>$subcheck = $_POST['subcheck'];<br /><br />mysql_query("INSERT INTO submission VALUES (NULL, '$uid', '$title', '$slug', '$cleanurl', '$displayurl', NULL, '$subcheck')");<br /></code></pre><br /><br /><p>The MySQL table:</p><br /><br /><pre><code>`submission` (<br />  `submissionid` int(11) unsigned NOT NULL auto_increment,<br />  `loginid` int(11) NOT NULL,<br />  `title` varchar(1000) NOT NULL,<br />  `slug` varchar(1000) NOT NULL,<br />  `url` varchar(1000) NOT NULL,<br />  `displayurl` varchar(1000) NOT NULL,<br />  `datesubmitted` timestamp NOT NULL default CURRENT_TIMESTAMP,<br />  `subcheck` tinyint(1) NOT NULL,<br />  PRIMARY KEY  (`submissionid`)<br />)<br /></code></pre><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/158865" rel="nofollow">John</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Arabic being displayed in giberish and question marks]]></title>
<link>http://www.globberstack.com/Questions/arabic-being-displayed-in-giberish-and-question-marks-1/</link>
<comments>http://www.globberstack.com/Questions/arabic-being-displayed-in-giberish-and-question-marks-1/</comments>
<pubDate>Wed, 08 Sep 2010 09:44:49 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/arabic-being-displayed-in-giberish-and-question-marks-1/</guid>
<description><![CDATA[<br />            <p>Hey,<br />I created a php website that would simply load the text from a mysql database, when I open it in a browser the Arabic text is presented in gibberish but then when I change the encoding of my browser to UTF-8 it's displayed properly, how can I force the encoding to be UTF-8 so users don't have to change it?</p><br /><br /><p>The menu part of the website which also loads the menu items from the same database (different table, they both have the same coalition "utf8_unicode_ci") but they are all displayed as question marks. How can I fix this?</p><br /><br /><p>You can check out the website on test.bdsfilmfest.com</p><br /><br /><p>Thank you in advance :)</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/423740" rel="nofollow">yousefcisco</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Any good Finance API?]]></title>
<link>http://www.globberstack.com/Questions/any-good-finance-api-1/</link>
<comments>http://www.globberstack.com/Questions/any-good-finance-api-1/</comments>
<pubDate>Wed, 08 Sep 2010 09:44:09 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/any-good-finance-api-1/</guid>
<description><![CDATA[<br />            <p>Yahoo! Finance feeds are pain in the ass.</p><br /><br /><p>Google Finance API seems OK but don't know why I can't retrieve stock quotes information for Dow Johnes, NASDAQ, S&amp;P...</p><br /><br /><p>Works perfect with company quotes like YHOO, MSFT but don't gets full data for stock indexes.</p><br /><br /><p>There is an <a href="http://www.yqlblog.net/blog/2009/06/02/getting-stock-information-with-yql-and-open-data-tables/" rel="nofollow">article</a> at YQL blog on how to get this data from Open tables with YQL, but that table is missing in the list.</p><br /><br /><p>Can anybody recommend any good API, web service or a feed?</p><br /><br /><p>Best answer + vote up guaranteed.</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/212167" rel="nofollow">Otar</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[UTF-8 encoding problem with XSLT via PHP]]></title>
<link>http://www.globberstack.com/Questions/utf-8-encoding-problem-with-xslt-via-php-1/</link>
<comments>http://www.globberstack.com/Questions/utf-8-encoding-problem-with-xslt-via-php-1/</comments>
<pubDate>Wed, 08 Sep 2010 09:36:27 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/utf-8-encoding-problem-with-xslt-via-php-1/</guid>
<description><![CDATA[<br />            <p>Hi all,</p><br /><br /><p>I'm facing a nasty encoding issue when transforming XML via XSLT through PHP.</p><br /><br /><p>The problem can be summarised/dumbed down as follows: when I copy a (UTF-8 encoded) XHTML file with an XSLT stylesheet, some characters are displayed wrong. When I just show the same XHTML file, all characters come out correctly.</p><br /><br /><p>Following files illustrate the problem:</p><br /><br /><h1>XHTML</h1><br /><br /><pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />&lt;!DOCTYPE html<br />PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />    &lt;head&gt;<br />        &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;<br />        &lt;title&gt;encoding test&lt;/title&gt;<br />    &lt;/head&gt;<br />    &lt;body&gt;<br />        &lt;p&gt;This is how we d&amp;#239;&amp;#223;&amp;#960;&amp;#955;&amp;#509; &amp;#145;special characters&amp;#146;&lt;/p&gt;<br />    &lt;/body&gt;<br />&lt;/html&gt;<br /></code></pre><br /><br /><h1>XSLT</h1><br /><br /><pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<br />    version="1.0"&gt;<br /><br />    &lt;xsl:output method="xml" encoding="UTF-8"/&gt;<br /><br />    &lt;xsl:template match="@*|node()"&gt;<br />        &lt;xsl:copy&gt;<br />            &lt;xsl:apply-templates select="@*|node()"/&gt;<br />        &lt;/xsl:copy&gt;<br />    &lt;/xsl:template&gt;<br /><br />&lt;/xsl:stylesheet&gt;<br /></code></pre><br /><br /><h1>PHP</h1><br /><br /><pre><code>&lt;?php<br />  $xml_file = 'encoding_test.xml';<br />  $xsl_file = 'encoding_test.xsl';<br /><br />  $xml_doc = new DOMDocument('1.0', 'utf-8');<br />  $xml_doc-&gt;load($xml_file);<br /><br />  $xsl_doc = new DOMDocument('1.0', 'utf-8');<br />  $xsl_doc-&gt;load($xsl_file);<br /><br />  $xp = new XsltProcessor();<br />  $xp-&gt;importStylesheet($xsl_doc);<br /><br />  // alllow to bypass XSLT transformation with bypass=true request parameter<br />  if ($bypass = $_GET['bypass']) {<br />    echo file_get_contents($xml_file);<br />  }<br />  else {<br />    echo $xp-&gt;transformToXML($xml_doc);<br />  }<br />?&gt;<br /></code></pre><br /><br /><p>When this script is invoked as such (via e.g. <a href="http://localhost/encoding_test/encoding_test.php" rel="nofollow">http://localhost/encoding_test/encoding_test.php</a>), all characters in the transformed XHTML document come out ok, except for the &amp;#145; and &amp;#146; character entities (they're opening and closing single quotation marks). I'm not a Unicode expert, but two things strike me:</p><br /><br /><ol><br /><li>all other character entities are interpreted correctly (which could imply something about the UTF-8-ness of <code>&amp;#145;</code> and <code>&amp;#146;</code>)</li><br /><li>yet, when the XHTML file is displayed unmediated (via e.g. <a href="http://localhost/encoding_test/encoding_test.php?bypass=true" rel="nofollow">http://localhost/encoding_test/encoding_test.php?bypass=true</a>), <em>all</em> characters are displayed properly.</li><br /></ol><br /><br /><p>I think I've declared UTF-8 encoding for the output anywhere I could. Do others perhaps see what's wrong and can be righted?</p><br /><br /><p>Thanks in advance!</p><br /><br /><p>Ron Van den Branden</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/396926" rel="nofollow">rvdb</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[mysql fails to start and i can't see why]]></title>
<link>http://www.globberstack.com/Questions/mysql-fails-to-start-and-i-cant-see-why-1/</link>
<comments>http://www.globberstack.com/Questions/mysql-fails-to-start-and-i-cant-see-why-1/</comments>
<pubDate>Wed, 08 Sep 2010 09:35:03 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/mysql-fails-to-start-and-i-cant-see-why-1/</guid>
<description><![CDATA[<br />            <p>Hi all.  After a reboot, mysql is failing to start.  Before i rebooted i was fooling around with the <code>/etc/mysql/my.cnf</code> file, trying to change my default character encoding from utf-8 to latin1.  As far as i can tell, i've undone my changes (thinking they were probably the result of it failing to start) but i'm not sure as i didn't make a backup (stupidly).</p><br /><br /><p>How can i see why mysql is failing to start?  I thought it would output something to <code>/var/log/mysql.err</code> or <code>/var/log/mysql.log</code> but there's nothing at all in either of those files.  Is there some other file that might be logging the problem, or can i perhaps start it in a verbose/trace mode that would output the problem?  I'm looking at the man file now but can't see anything helpful (though i may be looking at the wrong man file).</p><br /><br /><p>thanks - max</p><br /><br /><p>Here's the contents of my <code>/etc/mysql/my.cnf</code> file as it stands now, hopefully someone can spot something obviously wrong:</p><br /><br /><pre><code>#<br /># The MySQL database server configuration file.<br />#<br /># You can copy this to one of:<br /># - "/etc/mysql/my.cnf" to set global options,<br /># - "~/.my.cnf" to set user-specific options.<br /># <br /># One can use all long options that the program supports.<br /># Run program with --help to get a list of available options and with<br /># --print-defaults to see which it would actually understand and use.<br />#<br /># For explanations see<br /># http://dev.mysql.com/doc/mysql/en/server-system-variables.html<br /><br /># This will be passed to all mysql clients<br /># It has been reported that passwords should be enclosed with ticks/quotes<br /># escpecially if they contain "#" chars...<br /># Remember to edit /etc/mysql/debian.cnf when changing the socket location.<br />[client]<br />port        = 3306<br />socket      = /var/run/mysqld/mysqld.sock<br /><br /># Here is entries for some specific programs<br /># The following values assume you have at least 32M ram<br /><br /># This was formally known as [safe_mysqld]. Both versions are currently parsed.<br />[mysqld_safe]<br />socket      = /var/run/mysqld/mysqld.sock<br />nice        = 0<br /><br />[mysqld]<br />#<br /># * Basic Settings<br />#<br /><br />#<br /># * IMPORTANT<br />#   If you make changes to these settings and your system uses apparmor, you may<br />#   also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.<br />#<br /><br />user        = mysql<br />pid-file    = /var/run/mysqld/mysqld.pid<br />socket      = /var/run/mysqld/mysqld.sock<br />port        = 3306<br />basedir     = /usr<br />datadir     = /var/lib/mysql<br />tmpdir      = /tmp<br />skip-external-locking<br />#<br /># Instead of skip-networking the default is now to listen only on<br /># localhost which is more compatible and is not less secure.<br />bind-address        = 127.0.0.1<br />#<br /># * Fine Tuning<br />#<br />key_buffer      = 16M<br />max_allowed_packet  = 16M<br />thread_stack        = 192K<br />thread_cache_size       = 8<br /># This replaces the startup script and checks MyISAM tables if needed<br /># the first time they are touched<br />myisam-recover         = BACKUP<br />#max_connections        = 100<br />#table_cache            = 64<br />#thread_concurrency     = 10<br />#<br /># * Query Cache Configuration<br />#<br />query_cache_limit   = 1M<br />query_cache_size        = 16M<br />#<br /># * Logging and Replication<br />#<br /># Both location gets rotated by the cronjob.<br /># Be aware that this log type is a performance killer.<br /># As of 5.1 you can enable the log at runtime!<br />#general_log_file        = /var/log/mysql/mysql.log<br />#general_log             = 1<br />#<br /># Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.<br />#<br /># Here you can see queries with especially long duration<br />#log_slow_queries   = /var/log/mysql/mysql-slow.log<br />#long_query_time = 2<br />#log-queries-not-using-indexes<br />#<br /># The following can be used as easy to replay backup logs or for replication.<br /># note: if you are setting up a replication slave, see README.Debian about<br />#       other settings you may need to change.<br />#server-id      = 1<br />#log_bin            = /var/log/mysql/mysql-bin.log<br />expire_logs_days    = 10<br />max_binlog_size         = 100M<br />#binlog_do_db       = include_database_name<br />#binlog_ignore_db   = include_database_name<br />#<br /># * InnoDB<br />#<br /># InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.<br /># Read the manual for more InnoDB related options. There are many!<br />#<br /># * Security Features<br />#<br /># Read the manual, too, if you want chroot!<br /># chroot = /var/lib/mysql/<br />#<br /># For generating SSL certificates I recommend the OpenSSL GUI "tinyca".<br />#<br /># ssl-ca=/etc/mysql/cacert.pem<br /># ssl-cert=/etc/mysql/server-cert.pem<br /># ssl-key=/etc/mysql/server-key.pem<br /><br />#CHANGES<br /><br />[client]<br />#default-character-set=latin1<br /><br />[mysql]<br />#default-character-set=latin1<br /><br />[mysqld]<br />#default-character-set = latin1<br />#skip-character-set-client-handshake<br />#collation-server = utf8_unicode_ci<br />#init-connect='SET NAMES latin1'<br />#character-set-server = latin1<br /><br />#/CHANGES<br /><br /><br />[mysqldump]<br />quick<br />quote-names<br />max_allowed_packet  = 16M<br /><br />[mysql]<br />#no-auto-rehash # faster start of mysql but no tab completition<br /><br />[isamchk]<br />key_buffer      = 16M<br /><br />#<br /># * IMPORTANT: Additional settings that can override those from this file!<br />#   The files must end with '.cnf', otherwise they'll be ignored.<br />#<br />!includedir /etc/mysql/conf.d/<br /></code></pre><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/138557" rel="nofollow">Max Williams</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Need to fix a website that uses "border-spacing"]]></title>
<link>http://www.globberstack.com/Questions/need-to-fix-a-website-that-uses-border-spacing-1/</link>
<comments>http://www.globberstack.com/Questions/need-to-fix-a-website-that-uses-border-spacing-1/</comments>
<pubDate>Wed, 08 Sep 2010 09:35:01 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/need-to-fix-a-website-that-uses-border-spacing-1/</guid>
<description><![CDATA[Hi, Im kinda new to web development and without knowing that IE didnt support the code I stupidely used "border-spacing" CSS to basically build the entire framework of my website. I am currently in the process of undoing the damage, but Im wondering if there is some HTML command that I can use to directly replace "border-spacing" that I may not have heard about. Or what would be the easiest way to work around it.<br /><br />Any help is appreciated.<br /><br />Thanks<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Upload images using a folder in php]]></title>
<link>http://www.globberstack.com/Questions/upload-images-using-a-folder-in-php-1/</link>
<comments>http://www.globberstack.com/Questions/upload-images-using-a-folder-in-php-1/</comments>
<pubDate>Wed, 08 Sep 2010 09:34:28 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/upload-images-using-a-folder-in-php-1/</guid>
<description><![CDATA[<br />            <p>Hi,</p><br /><br /><p>I have a folder with full of images.But I have to upload the images to mysql database.</p><br /><br /><p>How can I do it using php code?</p><br /><br /><p>Regards,<br><br />Rekha</p><br /><br />        <p>Originally asked by: <a href="http://stackoverflow.com/users/334116" rel="nofollow">rekhasathvika</a> on Stack Overflow<br/><br/>0 Vote(s) ]]></description>
</item>

</channel>
</rss>
