<?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 / All</title>
<link>http://www.globberstack.com</link>
<description>Linux, Apache, MySQL & PHP Community Questions & Answers </description>
<pubDate>Sat, 31 Jul 2010 09:43:49 -0400</pubDate>
<language>en</language>
<item>
<title><![CDATA[need a dynamic  events' calendar]]></title>
<link>http://www.globberstack.com/Questions/need-a-dynamic-events-calendar-1/</link>
<comments>http://www.globberstack.com/Questions/need-a-dynamic-events-calendar-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:43:49 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/need-a-dynamic-events-calendar-1/</guid>
<description><![CDATA[<br />            <p>i was looking for an events' calendar whereby we can get a calendar and each date will have an option to add an event corresponding to that date. can i get that using some simple javascript.. i need to get that implemented using php... dont know how else to explain this ??</p><br /><br />        <br/><br/>3 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Functions outside the class]]></title>
<link>http://www.globberstack.com/Questions/functions-outside-the-class-1/</link>
<comments>http://www.globberstack.com/Questions/functions-outside-the-class-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:43:27 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/functions-outside-the-class-1/</guid>
<description><![CDATA[<br />            <p>I just want to tell you that I am newbie to OOP and it is quite hard to me, but here is my code:<p></p><br /><br /><pre><code>class functions<br />{<br />    function safe_query($string)<br />    {<br />    $string = mysql_escape_string(htmlspecialchars($string));<br />    return $string;<br />    }  <br />}<br /><br />class info<br />{<br />    public $text; <br /><br />    function infos($value)<br />    {<br />    echo functions::safe_query($value);<br />    }<br />}<br /></code></pre><br /><br /><p><p><br />Is there any way to make this sentence : <code>echo functions::safe_query($value);</code> prettier? I can use <code>extends</code>, than I could write <code>echo $this-&gt;safe_query($value);</code>, but is it a best way? Thank you.<p></p><br /><br /><p><strong>edit:</strong> and maybe I even can to not use class functions and just make separate file of functions and include that?</p><br /><br />        <br/><br/>3 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[alert for new update in php or javascript]]></title>
<link>http://www.globberstack.com/Questions/alert-for-new-update-in-php-or-javascript-1/</link>
<comments>http://www.globberstack.com/Questions/alert-for-new-update-in-php-or-javascript-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:41:26 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/alert-for-new-update-in-php-or-javascript-1/</guid>
<description><![CDATA[<br />            <p>How to change background color for  last render row in while loop ....</p><br /><br /><p>that is </p><br /><br /><pre><code>row1<br />row2<br />**row3**<br /></code></pre><br /><br /><p>If row4 is added then it should </p><br /><br /><pre><code>row1<br />row2<br />row3<br />**row4**<br /></code></pre><br /><br /><p>that is star represents some bgcolor red...</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[How To Programmatically Create Addon Domains on Shared Hosting Plans]]></title>
<link>http://www.globberstack.com/Questions/how-to-programmatically-create-addon-domains-on-shared-hosting-plans-1/</link>
<comments>http://www.globberstack.com/Questions/how-to-programmatically-create-addon-domains-on-shared-hosting-plans-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:41:24 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-to-programmatically-create-addon-domains-on-shared-hosting-plans-1/</guid>
<description><![CDATA[<br />            <p>On Linux-based shared hosting that is administered with cpanel, is there a programmatic way to create, sort of reliably, addon domains for my site if I know my cpanel login information and/or FTP information?</p><br /><br /><p>Note: interested in PHP and cpanel in this case.</p><br /><br />        <br/><br/>3 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[java.sql.SQLException: Incorrect string value: '\xF3\xBE\x8D\x81' ]]></title>
<link>http://www.globberstack.com/Questions/java-sql-sqlexception-incorrect-string-value-xf3xbex8dx81--1/</link>
<comments>http://www.globberstack.com/Questions/java-sql-sqlexception-incorrect-string-value-xf3xbex8dx81--1/</comments>
<pubDate>Sat, 31 Jul 2010 09:40:19 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/java-sql-sqlexception-incorrect-string-value-xf3xbex8dx81--1/</guid>
<description><![CDATA[<br />            <p>I am getting the following exception while trying to save some Tweets, </p><br /><br /><blockquote><br />  <p>Caused by: java.sql.SQLException: Incorrect string value: '\xF3\xBE\x8D\x81' for column 'twtText' at row 1<br />          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)<br />          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)<br />          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)<br />          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)<br />          at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)<br />          at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)<br />          at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)<br />          at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)<br />          at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)<br />          at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)<br />          at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)<br />          at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)<br />          at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)</p><br /></blockquote><br /><br /><p>My table structure is given below, all the columns are in UTF-8 format,</p><br /><br /><pre><code> CREATE TABLE `tblkeywordtracking` (<br />  `id` bigint(20) NOT NULL AUTO_INCREMENT,<br />  `word` varchar(200) NOT NULL,<br />  `tweetId` bigint(100) NOT NULL,<br />  `twtText` varchar(800) DEFAULT NULL,<br />  `negTwtText` varchar(1000) DEFAULT NULL,<br />  `language` text,<br />  `links` text,<br />  `negWt` double DEFAULT NULL,<br />  `posWt` double DEFAULT NULL,<br />  `tweetType` varchar(20) DEFAULT NULL,<br />  `source` text,<br />  `sourceStripped` text,<br />  `isTruncated` varchar(40) CHARACTER SET latin1 DEFAULT NULL,<br />  `inReplyToStatusId` bigint(30) DEFAULT NULL,<br />  `inReplyToUserId` int(11) DEFAULT NULL,<br />  `isFavorited` varchar(40) CHARACTER SET latin1 DEFAULT NULL,<br />  `inReplyToScreenName` varchar(40) DEFAULT NULL,<br />  `latitude` bigint(100) NOT NULL,<br />  `longitude` bigint(100) NOT NULL,<br />  `retweetedStatus` varchar(40) CHARACTER SET latin1 DEFAULT NULL,<br />  `statusInReplyToStatusId` bigint(100) NOT NULL,<br />  `statusInReplyToUserId` bigint(100) NOT NULL,<br />  `statusFavorited` varchar(40) CHARACTER SET latin1 DEFAULT NULL,<br />  `statusInReplyToScreenName` text,<br />  `screenName` text,<br />  `profilePicUrl` text,<br />  `twitterId` bigint(100) NOT NULL,<br />  `name` text,<br />  `location` text,<br />  `bio` text,<br />  `utcOffset` int(11) DEFAULT NULL,<br />  `timeZone` varchar(100) DEFAULT NULL,<br />  `frenCnt` bigint(20) DEFAULT '0',<br />  `createdAt` datetime DEFAULT NULL,<br />  `createdOnGMT` text CHARACTER SET latin1,<br />  `createdOnServerTime` datetime DEFAULT NULL,<br />  `follCnt` bigint(20) DEFAULT '0',<br />  `favCnt` bigint(20) DEFAULT '0',<br />  `totStatusCnt` bigint(20) DEFAULT NULL,<br />  `usrCrtDate` varchar(200) DEFAULT NULL,<br />  PRIMARY KEY (`id`),<br />  KEY `id` (`id`,`word`),<br />  KEY `twtText` (`twtText`(333)),<br />  KEY `word` (`word`,`tweetType`),<br />  KEY `posWt` (`posWt`,`negWt`)<br />) ENGINE=MyISAM AUTO_INCREMENT=1740 DEFAULT CHARSET=utf8;<br /></code></pre><br /><br />        <br/><br/>3 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[How to connect a SQL server to Java program.]]></title>
<link>http://www.globberstack.com/Questions/how-to-connect-a-sql-server-to-java-program--1/</link>
<comments>http://www.globberstack.com/Questions/how-to-connect-a-sql-server-to-java-program--1/</comments>
<pubDate>Sat, 31 Jul 2010 09:40:09 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-to-connect-a-sql-server-to-java-program--1/</guid>
<description><![CDATA[<br />            <p>I ve installed MySQL (last update). <br />I need to code, that ll create &amp; establish a connection with SQL DB<br />&amp; manage the DB(using SELECT, INSERT, CREATE).</p><br /><br /><p>I did everything but, i am not able to create connection..(i ve also installed the MySQL/J connector, i jus extracted the .zip pack in a folder &amp; added the folder path in Variables)</p><br /><br /><p>Can any1 tell me wat is mean by URL in the below line.... </p><br /><br /><pre><code>Connection connection = DriverManager.getConnection(url, username, password);<br /></code></pre><br /><br /><p>I ve tried this "<code>String url = "jdbc:odbc:sqlserver://localhost:3306/myfirstdb";</code> "<br />for "<code>Connection con = DriverManager.getConnection(url, "root", "1234");</code>"</p><br /><br /><p>But its not working... I cant able to understand the term 'URL'...<br />Can anyone explain, the meaning of 'url' and wat should be done to connect to a SQL server from Java.</p><br /><br /><p>Thanks</p><br /><br />        <br/><br/>1 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Suggest me optimized query using 4 tables ( RIGHT JOIN v/s INNER JOIN & HAVING )]]></title>
<link>http://www.globberstack.com/Questions/suggest-me-optimized-query-using-4-tables-right-join-vs-inner-join-having--1/</link>
<comments>http://www.globberstack.com/Questions/suggest-me-optimized-query-using-4-tables-right-join-vs-inner-join-having--1/</comments>
<pubDate>Sat, 31 Jul 2010 09:39:42 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/suggest-me-optimized-query-using-4-tables-right-join-vs-inner-join-having--1/</guid>
<description><![CDATA[<br />            <p>Hello ALL, </p><br /><br /><p>I have following table structure </p><br /><br /><pre><code>table_country ==&gt; country_id (PK) | country | status<br />table_department ==&gt; department_id (PK) | department | country_id (FK)<br />table_province ==&gt; province_id (PK) | province | department_id (FK)<br />table_district ==&gt; district_id (PK) | district | province_id (FK)<br /><br />NOTE: all tables engine  are innoDB<br /></code></pre><br /><br /><p>One country can have multiple department, one department can have multiple provine and one province can have multiple district. Now i need to search only those country which have atleast one district</p><br /><br /><p>i write below 2  SQL quries, in my case, both query give same results....please describe me the difference between below queries and suggest me to use optimized query</p><br /><br /><h3>USING RIGHT JOIN</h3><br /><br /><pre><code>SELECT c.country_id as id, c.country as name <br />FROM table_country c <br />RIGHT JOIN table_department d ON d.country_id=c.country_id <br />RIGHT JOIN  table_province p ON p.department_id=d.department_id <br />RIGHT JOIN table_district ds ON ds.province_id=p.province_id <br />WHERE   c.status='Active' GROUP BY (c.country_id)<br /></code></pre><br /><br /><h3>USING INNER JOIN and HAVING Clause</h3><br /><br /><pre><code>SELECT COUNT(ds.district),c.country_id as id, c.country as name <br />FROM table_country c <br />INNER JOIN table_department d ON d.country_id=c.country_id <br />INNER JOIN table_province p ON p.department_id=d.department_id <br />INNER JOIN table_district ds ON ds.province_id=p.province_id <br />WHERE c.status='Active' GROUP BY (c.country_id)  <br />HAVING  COUNT(ds.district)&gt;0<br /></code></pre><br /><br /><p>please tell me where these both query make the difference in results and which one i have to use or i have to use different query.</p><br /><br /><p>Thanks in Advance</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[How would I go about converting ASM to PHP?]]></title>
<link>http://www.globberstack.com/Questions/how-would-i-go-about-converting-asm-to-php-1/</link>
<comments>http://www.globberstack.com/Questions/how-would-i-go-about-converting-asm-to-php-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:37:17 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-would-i-go-about-converting-asm-to-php-1/</guid>
<description><![CDATA[<br />            <p>There is a program I would like to understand a bit more of, but most of it is in ASM. <a href="http://www.cortstratton.org/articles/HugiCode.html#mm1" rel="nofollow">MatrixMultiply</a> </p><br /><br /><p>The reference page is <a href="http://www.cortstratton.org/articles/OptimizingForSSE.php" rel="nofollow">here</a>.</p><br /><br /><p>I understand C++, but the ASM part is a bit vague. Can someone explain?</p><br /><br />        <br/><br/>3 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[problem with web page - please help]]></title>
<link>http://www.globberstack.com/Questions/problem-with-web-page-please-help-1/</link>
<comments>http://www.globberstack.com/Questions/problem-with-web-page-please-help-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:36:39 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/problem-with-web-page-please-help-1/</guid>
<description><![CDATA[I have a site online. The home page appears to be working just fine in several browsers. But my friend says that when she clicks on a tab the whole banner with tabs move to the right. I'd be ever so grateful if someone could check to see if this is...<br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[PHP immediate echo]]></title>
<link>http://www.globberstack.com/Questions/php-immediate-echo-1/</link>
<comments>http://www.globberstack.com/Questions/php-immediate-echo-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:36:27 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/php-immediate-echo-1/</guid>
<description><![CDATA[<br />            <p>I have quite a long data mining script, and in parts of it I echo some information to the page (during a foreach loop, actually.)</p><br /><br /><p>However I am noticing that the information is being sent to the browse not immediately as I had hoped, but in 'segments'.</p><br /><br /><p>Is there some function I can use after my echo to send all the data to the browser immediately?</p><br /><br /><p>Thanks.</p><br /><br />        <br/><br/>1 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[PHP for each issue]]></title>
<link>http://www.globberstack.com/Questions/php-for-each-issue-1/</link>
<comments>http://www.globberstack.com/Questions/php-for-each-issue-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:36:18 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/php-for-each-issue-1/</guid>
<description><![CDATA[<br />            <p>Hey all,</p><br /><br /><p>I am using the foreach function to get all the categories for a WordPress site and need a way to adjust the output if there is another tag, to include dynamic CSS.</p><br /><br /><p>Basically, if I have only one tag I need the code output to look like this:</p><br /><br /><pre><code>.category-wordpress #wordpress { background: #FFFFFF; color: #232323; text-decoration: none; }<br /></code></pre><br /><br /><p>and if there's more than one tag like this:</p><br /><br /><pre><code>.category-wordpress #wordpress, .category-html #html { background: #FFFFFF; color: #232323; text-decoration: none; }<br /></code></pre><br /><br /><p>The problem is with the comma between declarations. How can I change this code so a comma is only included if there is another category to include?</p><br /><br /><pre><code>if (is_category()) { <br /><br />$css_cats = "&lt;style type='text/css'&gt;";<br /><br /> //get all blog categories<br /> $categories = get_categories('title_li=&amp;orderby=name&amp;hide_empty=0');<br /><br /> if ($categories) {<br /><br />  foreach($categories as $category) {<br /><br />   $css_cats .= ".category-".$category-&gt;category_nicename." #".$category-&gt;category_nicename.", ";<br /><br />  }<br /><br /> } <br /><br />$css_cats .= "{ background: #FFFFFF; color: #232323; text-decoration: none; }";<br /><br />$css_cats .= "&lt;/style&gt;";<br /><br />echo $css_cats;<br /><br />}<br /></code></pre><br /><br /><p>This code is outputting a comma at the end of the last declaration like this:</p><br /><br /><pre><code>.category-wordpress #wordpress, .category-html #html, { background: #FFFFFF; color: #232323; text-decoration: none; }<br /></code></pre><br /><br /><p>so the CSS breaks.</p><br /><br /><p>I can change the code so it outputs the CSS declarations individually like this:</p><br /><br /><pre><code>.category-wordpress #wordpress { background: #FFFFFF; color: #232323; text-decoration: none; }<br />.category-html #html { background: #FFFFFF; color: #232323; text-decoration: none; }<br /></code></pre><br /><br /><p>but surely there's a better way?</p><br /><br /><p>Any help is greatly appreciated.</p><br /><br /><p>Cheers,</p><br /><br /><p>James</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[indexing databases]]></title>
<link>http://www.globberstack.com/Questions/indexing-databases-1/</link>
<comments>http://www.globberstack.com/Questions/indexing-databases-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:35:07 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/indexing-databases-1/</guid>
<description><![CDATA[Will someone tell me why the below doesn't add a record to the database. It only displays my source code? <br />  <br /><? <br />$username="root"; <br />$password=""; <br />$database="hoappsdb"; <br />$entrytype=$_POST['entrytype']; <br />$appl=$_POST['appl']; <br />$date=$_POST['date'];...<br/><br/>1 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Save Google map to jpeg using PHP?]]></title>
<link>http://www.globberstack.com/Questions/save-google-map-to-jpeg-using-php-1/</link>
<comments>http://www.globberstack.com/Questions/save-google-map-to-jpeg-using-php-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:34:19 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/save-google-map-to-jpeg-using-php-1/</guid>
<description><![CDATA[<br />            <p>Is it even possible? I am implementing an export to pdf functionality for a pile of data, one of which is a Google map with a marker.</p><br /><br /><p>Thank you.</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[how to convert json to string]]></title>
<link>http://www.globberstack.com/Questions/how-to-convert-json-to-string-1/</link>
<comments>http://www.globberstack.com/Questions/how-to-convert-json-to-string-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:34:03 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-to-convert-json-to-string-1/</guid>
<description><![CDATA[<br />            <p>how do i convert a json object to a string </p><br /><br /><p>i want to insert a json object to a mysql DB</p><br /><br />        <br/><br/>1 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[PHP's openssl_sign generates different signature than SSCrypto's sign]]></title>
<link>http://www.globberstack.com/Questions/phps-openssl-sign-generates-different-signature-than-sscryptos-sign-1/</link>
<comments>http://www.globberstack.com/Questions/phps-openssl-sign-generates-different-signature-than-sscryptos-sign-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:32:59 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/phps-openssl-sign-generates-different-signature-than-sscryptos-sign-1/</guid>
<description><![CDATA[<br />            <p>I'm writing an OS X client for a software that is written in PHP. This software uses a simple RPC interface to receive and execute commands. The RPC client has to sign the commands he sends to ensure that no MITM can modify any of them.</p><br /><br /><p>However, as the server was not accepting the signatures I sent from my OS X client, I started investigating and found out that PHP's openssl_sign function generates a different signature for a given private key/data combination than the Objective-C <a href="http://septicus.com/products/opensource/" rel="nofollow">SSCrypto</a> framework (which is only a wrapper for the openssl lib):</p><br /><br /><pre><code>SSCrypto *crypto = [[SSCrypto alloc] initWithPrivateKey:self.localPrivKey];<br />NSData *shaed = [self sha1:@"hello"];<br />[crypto setClearTextWithData:shaed];<br />NSData *data = [crypto sign];<br /></code></pre><br /><br /><p>generates a signature like <code>CtbkSxvqNZ+mAN</code>...</p><br /><br /><p>The PHP code</p><br /><br /><pre><code>openssl_sign("hello", $signature, $privateKey);<br /></code></pre><br /><br /><p>generates a signature like <code>6u0d2qjFiMbZ+</code>...<br />(For my certain key, of course. base64 encoded)</p><br /><br /><p>I'm not quite shure why this is happening and I unsuccessfully experimented with different hash-algorithms. As the PHP documentation states SHA1 is used by default.</p><br /><br /><p>So why do these two functions generate different signatures and how can I get my Objective-C part to generate a signature that PHPs openssl_verify will accept?</p><br /><br /><p>Note: I double checked that the keys and the data is correct!</p><br /><br />        <br/><br/>1 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[How do I put a video on my site?]]></title>
<link>http://www.globberstack.com/Questions/how-do-i-put-a-video-on-my-site-1/</link>
<comments>http://www.globberstack.com/Questions/how-do-i-put-a-video-on-my-site-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:31:29 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-do-i-put-a-video-on-my-site-1/</guid>
<description><![CDATA[Hi all,  <br /> <br />So I have a website and I am going to be using my video camera to make a video that <br />I want to have my video embed ed like within my text so its there and so they can just <br />click play.  <br /> <br />How do I do that? thanks for any help..<br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Should I continue this Java project]]></title>
<link>http://www.globberstack.com/Questions/should-i-continue-this-java-project-1/</link>
<comments>http://www.globberstack.com/Questions/should-i-continue-this-java-project-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:30:36 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/should-i-continue-this-java-project-1/</guid>
<description><![CDATA[<br />            <p>Hi!</p><br /><br /><p><a href="http://code.google.com/p/yami/" rel="nofollow">This</a> was my first project in Java, started just for fun and to learn some advanced gui/jdbc programming.</p><br /><br /><p>It is a GUI browser for MySQL databases, but I implemented a mysql-console-like interface for cmd lovers.<br />I planned to improve it by allowing the users to create/modify the existing databases/tables.<br />Because I'm the only developer of this project, it takes a lot of time to implement such things.</p><br /><br /><p>Does it worth to improve this project and to continue with my plans?<br />What do you think?</p><br /><br />        <br/><br/>1 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Mac ports Mysql install]]></title>
<link>http://www.globberstack.com/Questions/mac-ports-mysql-install-1/</link>
<comments>http://www.globberstack.com/Questions/mac-ports-mysql-install-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:29:37 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/mac-ports-mysql-install-1/</guid>
<description><![CDATA[<br />            <p>I completed my install on Leopard with Mac Ports. I also installed Mysqld via Mac Ports for use with python. I set the password for mysql on mysql start. Everything seemed to be fine except when I invoke mysql-start from the command line now I get this: mysql-start<br /><em>*</em>**Password:<br />Starting MySQL<br />. SUCCESS! <br />demetrius-fords-macbook-pro-17:~ demet8$</p><br /><br /><p>I also get a system que stating:Do you want mysqld to accepting incoming notifications.....</p><br /><br /><p>So I kinda think I am activating mysqld, not the actual mysql command interpreter. I can use mysql-stop with no problem to shut the server down. Lastly in the Python interpreter when I run:  <strong><em>import MySQLdb</em></strong> I get this:</p><br /><br /><p>/<strong>opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/_<em>init</em>_.py:34: DeprecationWarning: the sets module is deprecated<br />  from sets import ImmutableSet</strong></p><br /><br /><p>I don't think this affects mysqld @ all. I don't have the mysql default socket in my path via bash_login. Do I need to do that? thank you....</p><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Compare 2 fields in 2 tables and extract data]]></title>
<link>http://www.globberstack.com/Questions/compare-2-fields-in-2-tables-and-extract-data-1/</link>
<comments>http://www.globberstack.com/Questions/compare-2-fields-in-2-tables-and-extract-data-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:29:07 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/compare-2-fields-in-2-tables-and-extract-data-1/</guid>
<description><![CDATA[<br />            <p>How do i compare 2 fields in 2 tables, find a match and use it ?<br />example:</p><br /><br /><p>table1: data1(id_data1,name,address,phone,account)<br />table2: data2(id_data2,name2)</p><br /><br /><p>now in php:<br />if (name2.table2 has a matching name in name.table1) { give me the address,phone,account }</p><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[ link Redirect from php]]></title>
<link>http://www.globberstack.com/Questions/-link-redirect-from-php-1/</link>
<comments>http://www.globberstack.com/Questions/-link-redirect-from-php-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:28:51 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/-link-redirect-from-php-1/</guid>
<description><![CDATA[<br />            <blockquote><br />  <p>Dear  all</p><br />  <br />  <p>I have database of website link, it list out in  main file ,when i try to click that link it get to redirect on that database link.<br />   my code is<br />  test.php</p><br /></blockquote><br /><br /><pre><code>&lt;?php<br /><br />// getting from database<br /><br /> echo '&lt;li onclick=\"window.location='.$result-&gt;website.'\"&gt;<br />       &lt;a href="#"&gt;'.$result-&gt;option.'&lt;/a&gt;&lt;/li&gt;';<br />?&gt;<br /></code></pre><br /><br /><blockquote><br />  <p>The Main.html calls that test.php<br />  while ajax</p><br /></blockquote><br /><br /><pre><code>$.post("test.php", {queryString: ""+inputString+""}, function(data){<br /><br />});<br /></code></pre><br /><br /><blockquote><br />  <p>how to do it?<br />  any idea  Is it possible with<br />  serverside script? whats wrong with my php code?</p><br /></blockquote><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[How to handle MySQL shutdown in Matlab?]]></title>
<link>http://www.globberstack.com/Questions/how-to-handle-mysql-shutdown-in-matlab-1/</link>
<comments>http://www.globberstack.com/Questions/how-to-handle-mysql-shutdown-in-matlab-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:27:27 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-to-handle-mysql-shutdown-in-matlab-1/</guid>
<description><![CDATA[<br />            <p>Greetings all-</p><br /><br /><p>I'm writing a program that parses and cleans a lot of data from one database to another on Matlab, querying from MySQL. This would run continuously, as new data come into the first db every minute, are cleaned, and put to the clean db before the next data point comes in. I was wondering how, during this process, I could account for two things...</p><br /><br /><ol><br /><li><p>Every three nights MySQL is shutdown for backup. I'd like my program to pause when this happens, and resume when its back up. I've looked around for a solution, and can't seem to find one for this.</p></li><br /><li><p>Allow a user to kill the program. I've narrowed this down to either accounting for a ctrl+c kill, or creating a GUI to do it. Which do you all think would be the better strategy?</p></li><br /></ol><br /><br /><p>Thanks in advance for your time and help on this matter.</p><br /><br />        <br/><br/>3 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[PHP Alternative Control Structures, any drawbacks?]]></title>
<link>http://www.globberstack.com/Questions/php-alternative-control-structures-any-drawbacks-1/</link>
<comments>http://www.globberstack.com/Questions/php-alternative-control-structures-any-drawbacks-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:27:11 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/php-alternative-control-structures-any-drawbacks-1/</guid>
<description><![CDATA[<br />            <p>I've been working with <code>PHP</code> code that generates HTML without any templating, and it's quite spaghetti and difficult to read with the way they've structured it. One way to drastically improve following the flow I've noticed is to use <code>:</code> <code>endif</code> instead of <code>{ }</code> blocks in some cases to increase readability. (See <a href="http://php.net/manual/en/control-structures.alternative-syntax.php" rel="nofollow">http://php.net/manual/en/control-structures.alternative-syntax.php</a>)</p><br /><br /><ul><br /><li>Is this portable?</li><br /><li>Is this standard?</li><br /><li>Is this slower in any significant way (I understand it takes more chars)</li><br /></ul><br /><br /><p>Cheers!</p><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[class variable is reset each request]]></title>
<link>http://www.globberstack.com/Questions/class-variable-is-reset-each-request-1/</link>
<comments>http://www.globberstack.com/Questions/class-variable-is-reset-each-request-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:23:42 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/class-variable-is-reset-each-request-1/</guid>
<description><![CDATA[<br />            <p>i hava a class that hold a list for each request <br />but each request the list is empty again <br />what can i do to make it live</p><br /><br /><p>here is my class , i want the list to hold values from previews requests <br />(yes each request i'm settings a value there )</p><br /><br /><pre><code>class Sessions{<br />    private static $list     = array();<br />    ....<br />    .....<br />}<br /></code></pre><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Script works perfectly in ff,s,o,c,but not ie]]></title>
<link>http://www.globberstack.com/Questions/script-works-perfectly-in-ffsocbut-not-ie-1/</link>
<comments>http://www.globberstack.com/Questions/script-works-perfectly-in-ffsocbut-not-ie-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:22:46 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/script-works-perfectly-in-ffsocbut-not-ie-1/</guid>
<description><![CDATA[Script works perfectly in firefox, safari, opera, chrome, but not internet explorer.<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;html&gt;<br />&lt;head&gt;<br />&lt!--&lt;link rel="stylesheet" type="text/css" href="bop_css.css" /&gt;--&gt;<br />&lt;style type="text/css"&gt;<br />body{font-family:arial;}<br />a{color:blue;font-size:100%;text-decoration:none; width:200px;}<br />a.one:visited {color:blue;}<br />a.one:hover {color:red;}<br />p{color:blue;text-decoration:none;font-size:150%; width:200px;}<br />p.one:visited {color:blue;}<br />p.one:hover {color:red;}<br />p.comment{color:black;text-decoration:none;font-size:75%; width:65px;}<br />div.menu {<br />    visibility:hidden;<br />width:200px;<br />  }<br />&lt;/style&gt;<br />&lt;script type="text/javascript"&gt;<br />function showmenu(elmnt)<br />{<br />outerdiv=document.getElementById(elmnt);<br />outerdiv.style.visibility="visible";<br /><br />//now target ALL divs within it using function<br />innerdivchange(outerdiv,"visible");<br />}<br /><br />function hidemenu(elmnt)<br />{<br />outerdiv=document.getElementById(elmnt);<br />outerdiv.style.visibility="hidden";<br /><br />//now target ALL divs within it using function<br />innerdivchange(outerdiv,"hidden")<br />}<br /><br /><br />function innerdivchange(outerdiv,vis_state)<br />{<br />//now target ALL divs within it<br />innerdivs=outerdiv.getElementsByTagName("div");<br /><br />for(i=0;i&lt;innerdivs.length;i++)<br />{<br />innerdivs[i].style.visibility=vis_state;<br />}<br />}<br />&lt;/script&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />&lt;div onmouseover="showmenu('location')" onmouseout="hidemenu('location')" &gt; <br />  &lt;p class="one" style="outline:none;position:fixed;left:120px;top:220px;"&gt;By Location&lt;/p&gt;<br />  &lt;div style="position:fixed;left:275px;top:247px;" class="menu" id="location"&gt;<br />     &lt;p class="comment" style="position:fixed;left:30px;top:210px;" &gt; Where do you want to buy it?&lt;/p&gt; <br />     &lt;a class="one" href="jf3.php"&gt;40th &amp; Old Cheney&lt;/a&gt;&lt;/br&gt;<br />	 &lt;a class="one" href="jf3.php"&gt;40th &amp; Old Cheney&lt;/a&gt;&lt;br/&gt;<br />     &lt;a class="one" href="jf3.php"&gt;40th &amp; Old Cheney&lt;/a&gt;<br />	 &lt;div style="position:fixed;left:473px;top:247px;" class="menu" &gt;<br />	   &lt;a class="one" href="jf3.php"&gt;40th &amp; Old Cheney&lt;/a&gt;&lt;br/&gt;<br />       &lt;a class="one" href="jf3.php"&gt;40th &amp; Old Cheney&lt;/a&gt;&lt;br/&gt;<br />       &lt;a class="one" href="jf3.php"&gt;40th &amp; Old Cheney&lt;/a&gt;<br />     &lt;/div&gt;<br />     &lt;div style="position:fixed;left:671px;top:247px;" class="menu" &gt;<br />	   &lt;a class="one" href="jf3.php"&gt;ZZZZZZZ40th &amp; Old Cheney&lt;/a&gt;&lt;br/&gt;<br />       &lt;a class="one" href="jf3.php"&gt;40th &amp; Old Cheney&lt;/a&gt;&lt;br/&gt;<br />       &lt;a class="one" href="jf3.php"&gt;40th &amp; Old Cheney&lt;/a&gt;<br />     &lt;/div&gt;<br />  &lt;/div&gt; <br />&lt;/div&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br /><br /></div><br />Recommendations?<br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Native language problem in mysql with tinyMCE]]></title>
<link>http://www.globberstack.com/Questions/native-language-problem-in-mysql-with-tinymce-1/</link>
<comments>http://www.globberstack.com/Questions/native-language-problem-in-mysql-with-tinymce-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:22:45 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/native-language-problem-in-mysql-with-tinymce-1/</guid>
<description><![CDATA[<br />            <p>I have turkish character problem in mysql database when adding content with tinymce from admin panel.</p><br /><br /><p>Charset is:</p><br /><br /><pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9"" /&gt;<br /></code></pre><br /><br /><p>How can I solve this?<br />Thanks in advance</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Display details upon image click]]></title>
<link>http://www.globberstack.com/Questions/display-details-upon-image-click-1/</link>
<comments>http://www.globberstack.com/Questions/display-details-upon-image-click-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:22:24 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/display-details-upon-image-click-1/</guid>
<description><![CDATA[Hi All, <br /> <br />I've created one page which displays the thumbnail images along with its design ID (extracted from a databse) in a row. Then upon click of each image it displays the larger image and it's additional info. <br /> <br />Currently, I've displayed each thumbnail image by referencing image ids...<br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Why index made this query slower?]]></title>
<link>http://www.globberstack.com/Questions/why-index-made-this-query-slower-1/</link>
<comments>http://www.globberstack.com/Questions/why-index-made-this-query-slower-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:22:23 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/why-index-made-this-query-slower-1/</guid>
<description><![CDATA[<br />            <p>Table has 1 500 000 records, 1 250 000 of them have field = 'z'.<br><br />I need select random not 'z' field.</p><br /><br /><pre><code>$random = mt_rand(1, 250000);  <br />$query = "SELECT field FROM table WHERE field != 'z' LIMIT $random, 1";<br /></code></pre><br /><br /><p>It is working ok.  </p><br /><br /><p>Then I decided to optimize it and indexed <code>field</code> in table.  </p><br /><br /><p>Result was strange - it was <strong>slower ~3 times</strong>. I tested it.<br><br />Why it is slower? Is not such indexing should make it faster?</p><br /><br /><p>my ISAM  </p><br /><br /><pre><code>explain with index:  <br />id  select_type  table  type  possible_keys  key   key_len  ref  rows     Extra  <br />1   SIMPLE       table  range field          field 758      NULL 1139287  Using  <br /><br />explain without index:  <br />id  select_type  table  type  possible_keys  key  key_len  ref  rows     Extra  <br />1   SIMPLE       table  ALL   NULL           NULL NULL     NULL 1484672  Using where<br /></code></pre><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[remote server connect with mysql]]></title>
<link>http://www.globberstack.com/Questions/remote-server-connect-with-mysql-1/</link>
<comments>http://www.globberstack.com/Questions/remote-server-connect-with-mysql-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:19:41 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/remote-server-connect-with-mysql-1/</guid>
<description><![CDATA[<br />            <p>Hi,</p><br /><br /><p>I have mysql 5.1 set up and running.</p><br /><br /><p>I need to connect to:</p><br /><br /><p>location: comm.eng.bxg.com</p><br /><br /><p>name: amntxy</p><br /><br /><p>user: username</p><br /><br /><p>pswd: password</p><br /><br /><p>I have tried using</p><br /><br /><p>mysql -h amntxy -u username -p</p><br /><br /><p>Also tried: use amntxy and use comm.eng.bxg.com/amntxy</p><br /><br /><p>But I am unable to connect.</p><br /><br /><p>I get the following error:</p><br /><br /><p>ERROR 2005 (HY000): Unknown MySQL server host</p><br /><br /><p>I also tried mysql_connect but keep getting the error : mysql_connect is not recognized as internal or external command</p><br /><br /><p>But I do not understand hwo I can connect here.</p><br /><br /><p>Please help.</p><br /><br /><p>Thank you</p><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Drupal: Edit email template from contact form]]></title>
<link>http://www.globberstack.com/Questions/drupal-edit-email-template-from-contact-form-1/</link>
<comments>http://www.globberstack.com/Questions/drupal-edit-email-template-from-contact-form-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:19:03 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/drupal-edit-email-template-from-contact-form-1/</guid>
<description><![CDATA[<br />            <p>When submitting a message in my site-wide contact form in Drupal 6.x I get the following message along  the top of every message:</p><br /><br /><p>[Name] sent a message using the contact form at [www.mysite.com/contact]</p><br /><br /><p>I would like to remove this message. Looking around, I've found it comes from the contact.module here:</p><br /><br /><pre><code>$message['body'][] = t("!name sent a message using the contact form at !form.", array('!name' =&gt; $params['name'], '!form' =&gt; url($_GET['q'], array('absolute' =&gt; TRUE, 'language' =&gt; $language))), $language-&gt;language);<br /></code></pre><br /><br /><p>I've done a bit of research and it seems that I need to create a custom module with a hook_mail_alter() function to edit the contact.module. When it comes to this I get a bit lost. Could anyone kindly take me through the steps to accomplish the task?</p><br /><br /><p>Many thanks.</p><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[PHP OOP working with a hierarchy of objects]]></title>
<link>http://www.globberstack.com/Questions/php-oop-working-with-a-hierarchy-of-objects-1/</link>
<comments>http://www.globberstack.com/Questions/php-oop-working-with-a-hierarchy-of-objects-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:17:42 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/php-oop-working-with-a-hierarchy-of-objects-1/</guid>
<description><![CDATA[<br />            <p>Hi everyone,</p><br /><br /><p>I have a <code>Site</code> object but I can't figure out how best to store a collection of <code>Page</code> objects on Site. The pages are hierarchical (a tree structure for a website navigation). I thought about a tree-like array of pages but that would be a pain to interact with - e.g. <code>$site-&gt;pages[0][3][1]-&gt;addContent('&lt;h1&gt;lol&lt;/h1&gt;')</code>. I could use a flat array of pages with unique IDs like <code>$site-&gt;pages['home']-&gt;addContent('&lt;p&gt;easier&lt;/p&gt;')</code> but how would I extract a tree from that when it came to rendering navigation?</p><br /><br /><p>Can anyone help guide me in the right direction please?</p><br /><br /><p>Thanks!</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[how to use the character " (double quote) in RMySQL?]]></title>
<link>http://www.globberstack.com/Questions/how-to-use-the-character-double-quote-in-rmysql-1/</link>
<comments>http://www.globberstack.com/Questions/how-to-use-the-character-double-quote-in-rmysql-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:17:40 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/how-to-use-the-character-double-quote-in-rmysql-1/</guid>
<description><![CDATA[<br />            <p>I am toying with RMySQL and trying to import a testing database using the following code:</p><br /><br /><pre><code>dbSendQuery(db, statement = "LOAD DATA LOCAL INFILE '~/R/survey/pet.csv' INTO TABLE pet <br />                              FIELDS TERMINATED BY '\t' <br />                                     ENCLOSED BY '@'<br />                              IGNORE 1 LINES")<br /></code></pre><br /><br /><p>My Question is:</p><br /><br /><p>You can see I am using '@' for enclosing each piece of data (i.e. @hello@, @hi@ will be 2 pieces of data), I try to use paste() or cat() to replace the '@' with '"' but fails.</p><br /><br /><p>Most of the spreadsheet software quote the cells using '"', how can I use the '"' character when writing statement for RMySQL?</p><br /><br /><p>Thanks!</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Django MySql setup]]></title>
<link>http://www.globberstack.com/Questions/django-mysql-setup-1/</link>
<comments>http://www.globberstack.com/Questions/django-mysql-setup-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:17:21 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/django-mysql-setup-1/</guid>
<description><![CDATA[<br />            <p>I set up Mysql5, mysql5-server and py26-mysql using Macports. I then started the mysql server and was able to start the prompt with <code>mysql5</code></p><br /><br /><p>In my settings.py i changed database_engine to "mysql" and put "dev.db" in database_name.</p><br /><br /><p>I left the username and password blank as the database doesnt exist yet.</p><br /><br /><p>When I ran <code>python manage.py syncdb</code>, django raised an error</p><br /><br /><p>'django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dynamic module does not define init function (init_mysql)`</p><br /><br /><p>How do I fix this? Do I have to create the database first? is it something else?</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Unicode characters become question marks after inserting into database]]></title>
<link>http://www.globberstack.com/Questions/unicode-characters-become-question-marks-after-inserting-into-database-1/</link>
<comments>http://www.globberstack.com/Questions/unicode-characters-become-question-marks-after-inserting-into-database-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:16:45 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/unicode-characters-become-question-marks-after-inserting-into-database-1/</guid>
<description><![CDATA[<br />            <p>When I insert some text written in unicode into database, they become question marks. Database encoding is set to utf-8. What else may be incorrect? When I check in phpmyadmin there are question marks inserted only!</p><br /><br /><p>This is the code I use for connecting to database:</p><br /><br /><pre><code>define ("DB_HOST", "localhost"); // set database host<br />define ("DB_USER", "root"); // set database user<br />define ("DB_PASS","password"); // set database password<br />define ("DB_NAME","name"); // set database name<br /><br />$link = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Couldn't make connection.");<br />$db = mysql_select_db(DB_NAME, $link) or die("Couldn't select database");<br /><br />mysql_set_charset('utf8',$link); <br />mysql_query("SET CHARACTER SET utf8");<br /></code></pre><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Calculating total time duration in MySQL]]></title>
<link>http://www.globberstack.com/Questions/calculating-total-time-duration-in-mysql-1/</link>
<comments>http://www.globberstack.com/Questions/calculating-total-time-duration-in-mysql-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:16:15 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/calculating-total-time-duration-in-mysql-1/</guid>
<description><![CDATA[<br />            <p>i have a table data like this</p><br /><br /><pre><code>(int)   (time)  [mySQL datatype]<br /><br />Id     Duration <br /><br />1      00:10:00<br /><br />2      10:10:00<br /><br />3      03:00:00<br /><br />4      04:13:00<br /></code></pre><br /><br /><p>i want to calculate the total duration from this table, how can we do it. like 17:33:00.<br />Could anybody please provide mysql query to calculate this.</p><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[What does this error mean..?]]></title>
<link>http://www.globberstack.com/Questions/what-does-this-error-mean--1/</link>
<comments>http://www.globberstack.com/Questions/what-does-this-error-mean--1/</comments>
<pubDate>Sat, 31 Jul 2010 09:15:49 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/what-does-this-error-mean--1/</guid>
<description><![CDATA[&lt;p&gt;&lt;font color="#990000""&gt;SC2X.Net will be Hosting a 1V1 Single Eli&#8230;<br />&#9993;<br />An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).<br /><br />Can't seem to figure out where the problem is...<br/><br/>3 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[MySQL (exploding/matching array)]]></title>
<link>http://www.globberstack.com/Questions/mysql-explodingmatching-array-1/</link>
<comments>http://www.globberstack.com/Questions/mysql-explodingmatching-array-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:15:01 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/mysql-explodingmatching-array-1/</guid>
<description><![CDATA[<br />            <p>Question1:</p><br /><br /><p><strong>MySQL table</strong></p><br /><br /><p><strong>id | array</strong><br><br />1  | 1,2,3<br><br />2  | 2<br><br />3  | 2,3<br><br />4  | 4,5,6<br></p><br /><br /><pre><code>$_GET['id'] = 2;<br />$a = mysql_query("SELECT * FROM `table` WHERE `array` ??? '$_GET[id]'");<br /></code></pre><br /><br /><p>In this step, I want to run through the <strong>entire</strong> array and see if it matches with the $_GET['id'], so it should output:</p><br /><br /><p>ids: 1,2,3</p><br /><br /><p>Question2:</p><br /><br /><p><strong>MySQL table</strong></p><br /><br /><p><strong>id | array</strong><br><br />1  | 4,5,6<br><br />2  | 3,4,7<br></p><br /><br /><pre><code>$_GET['id'] = 4;<br />$a = mysql_query("SELECT * FROM `table` WHERE `array` ??? '$_GET[id]'");<br /></code></pre><br /><br /><p>In this step, I <strong>only</strong> want to match against the first element in the array, so it should output:</p><br /><br /><p>id: 4</p><br /><br /><p>I can only think of using PHP to do this, but I'd rather do all that just within the MySQL query, if that is even possible.</p><br /><br /><pre><code>$a = mysql_query("SELECT * FROM `table`");<br />while($b = mysql_fetch_assoc($a))<br />{<br />    $elements = explode(',', $b['array']);<br />    foreach($elements as $element)<br />    {<br />        if($element == $_GET['id'])<br />        {<br />            echo $b['id'].'&lt;br /&gt;';<br />        }<br />    }<br />}<br /></code></pre><br /><br /><p>or </p><br /><br /><pre><code>$a = mysql_query("SELECT * FROM `table`");<br />while($b = mysql_fetch_assoc($a))<br />{<br />    $array = $b['array'];<br /><br />    if(in_array($_GET['id'], $array))<br />    {<br />        echo $b['id'].'&lt;br /&gt;';<br />    }<br />}<br /></code></pre><br /><br /><p>that would look just awful.</p><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[404 redirecting on include file]]></title>
<link>http://www.globberstack.com/Questions/404-redirecting-on-include-file-1/</link>
<comments>http://www.globberstack.com/Questions/404-redirecting-on-include-file-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:14:37 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/404-redirecting-on-include-file-1/</guid>
<description><![CDATA[<br />            <p>Hello all,<br />I have added a 404 page and included the following in the .htaccess</p><br /><br /><p>ErrorDocument 404 <a href="http://www.game-plan.net/404.php" rel="nofollow">http://www.game-plan.net/404.php</a></p><br /><br /><p>For some reason I'm not aware of, when i process forms, it doesnt want to do that, it wants to redirect to a 404 page.</p><br /><br /><p>Is this anything common?<br />Something I dont know that maybe someone has come across before?<br />Thanks</p><br /><br /><p>Code sample - </p><br /><br /><pre><code>&lt;form action='process.php' method='POST'&gt;<br />            &lt;select name='game'&gt;<br />            &lt;?php<br /><br />            $q = $database-&gt;allGame();<br />            while($row=mysql_fetch_assoc($q))<br />            {<br />                $u=$row['name'];<br />                echo "&lt;option value=\"$u\"&gt;$u&lt;/option&gt;";<br />            }<br />            ?&gt;<br />            &lt;/select&gt;<br />            &lt;input type='hidden' name='type' value='1' /&gt;<br />            &lt;input type='hidden' name='joinrank' /&gt;<br />            &lt;input type='submit' value='Proceed' /&gt;<br />            &lt;/form&gt;<br /></code></pre><br /><br />        <br/><br/>2 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[Looking for E107 Themes]]></title>
<link>http://www.globberstack.com/Questions/looking-for-e107-themes-1/</link>
<comments>http://www.globberstack.com/Questions/looking-for-e107-themes-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:13:51 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/looking-for-e107-themes-1/</guid>
<description><![CDATA[I have been searching for free or paid E107 themes for weeks now. I have been unable to find any good ones for the type of site I am trying to design.I will be running a fan site for Disney Theme parks. Getting a custom design is out of the question unless they want to do it for 60 us. If anyone...<br/><br/>1 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[php: get class constructor]]></title>
<link>http://www.globberstack.com/Questions/php-get-class-constructor-1/</link>
<comments>http://www.globberstack.com/Questions/php-get-class-constructor-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:12:21 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/php-get-class-constructor-1/</guid>
<description><![CDATA[<br />            <p>how to get a class constructor function name without instantiating the class?</p><br /><br /><p>example:</p><br /><br /><pre><code>$class = 'someClass';<br />$constructor = somehow get constructor;<br /><br />$args = array();<br />$object = call_user_func_array(array($class,$constructor),$args);<br /></code></pre><br /><br /><p>what I need is to create a object by passing a undetermined number of variables into it's constructor.</p><br /><br />        <br/><br/>0 Vote(s) ]]></description>
</item>

<item>
<title><![CDATA[PHP error on wordpress 404 page]]></title>
<link>http://www.globberstack.com/Questions/php-error-on-wordpress-404-page-1/</link>
<comments>http://www.globberstack.com/Questions/php-error-on-wordpress-404-page-1/</comments>
<pubDate>Sat, 31 Jul 2010 09:12:20 -0400</pubDate>
<dc:creator>topdog</dc:creator>
<category>Questions</category>
<guid>http://www.globberstack.com/Questions/php-error-on-wordpress-404-page-1/</guid>
<description><![CDATA[I was trying to tie up some loose ends on blog today (Fixing broken links, add error pages and such)  <br />But when i try to display the standard wordpress 404 page I get somewhat of a mysterious error;  <br /> <br />"*Fatal error*:  Call to undefined function ...<br/><br/>1 Vote(s) ]]></description>
</item>

</channel>
</rss>
