<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community - MySQL</title>
		<link>http://www.daniweb.com/forums/</link>
		<description><![CDATA[Our MySQL forum is the place for Q&A-style discussions related to this open source database. LAMP developers will appreciate our PHP forum.]]></description>
		<language>en-US</language>
		<lastBuildDate>Sun, 08 Nov 2009 03:00:17 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/alphaimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community - MySQL</title>
			<link>http://www.daniweb.com/forums/</link>
		</image>
		<item>
			<title>Universal character set?</title>
			<link>http://www.daniweb.com/forums/thread236543.html</link>
			<pubDate>Fri, 06 Nov 2009 10:48:03 GMT</pubDate>
			<description>I have a database that needs to hold names of people from all around the world. Some names have special characters in them such as é and ¢ 
 
Is there a character set I can use that will accept any character no matter what language it is (with the exception of non-English looking characters like...</description>
			<content:encoded><![CDATA[<div>I have a database that needs to hold names of people from all around the world. Some names have special characters in them such as é and ¢<br />
<br />
Is there a character set I can use that will accept any character no matter what language it is (with the exception of non-English looking characters like chinese characters for instance)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Venom Rush</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236543.html</guid>
		</item>
		<item>
			<title>.sql file loses characters</title>
			<link>http://www.daniweb.com/forums/thread236299.html</link>
			<pubDate>Thu, 05 Nov 2009 15:13:22 GMT</pubDate>
			<description><![CDATA[Hello 
New member and pretty ignorant about SQL I should say. 
I have made regular backups of mySQL database and now that I need to restore it* I see all the characters (UTF-8) characters have changed to wierd characters *that make no sense at all.   
I am using *phpMyAdmin's Export tool *which...]]></description>
			<content:encoded><![CDATA[<div>Hello<br />
New member and pretty ignorant about SQL I should say.<br />
I have made regular backups of mySQL database and now that I need to restore it<span style="font-weight:bold"> I see all the characters (UTF-8) characters have changed to wierd characters </span>that make no sense at all.  <br />
I am using <span style="font-weight:bold">phpMyAdmin's Export tool </span>which generates a .sql file.  But I see no option while saving this file to select UTF-8 or ASCII.<br />
<br />
<span style="font-weight:bold"><span style="color:Green"><span style="color:green">2 questions:<br />
1. HOw can I restore my backup file into proper characers?<br />
2.what can I do in future to avoid this problem and save the .sql file as UTF-8.</span></span></span><br />
Greatly appreciate your attention<br />
L</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Logical1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236299.html</guid>
		</item>
		<item>
			<title>exclude</title>
			<link>http://www.daniweb.com/forums/thread236270.html</link>
			<pubDate>Thu, 05 Nov 2009 13:18:11 GMT</pubDate>
			<description><![CDATA[hi 
 
i have two tables, one is products, the other is for 'discounts' on those products... when adding a new 'discount' i want to avoid adding two discounts to a single product... so i was looking for some sort of Right Join which would exclude all products which have a match in the discount...]]></description>
			<content:encoded><![CDATA[<div>hi<br />
<br />
i have two tables, one is products, the other is for 'discounts' on those products... when adding a new 'discount' i want to avoid adding two discounts to a single product... so i was looking for some sort of Right Join which would exclude all products which have a match in the discount table?!<br />
<br />
Ill be using a 'select' to choose a product to add a discount to... the query needs to output all product name without a corresponding discount entry...<br />
<br />
any ideas?<br />
<br />
lworks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>lifeworks</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236270.html</guid>
		</item>
		<item>
			<title>What does mysql return when the selection doesnt exist?</title>
			<link>http://www.daniweb.com/forums/thread236046.html</link>
			<pubDate>Wed, 04 Nov 2009 19:51:03 GMT</pubDate>
			<description><![CDATA[Ok so what does mysql return when the select query doesnt exist. So say I query the database: SELECT username FROM user WHERE username='test' AND password='test' 
 
Ok so say test doesnt exist what will the database return because i code in java and have made a method that should return true or...]]></description>
			<content:encoded><![CDATA[<div>Ok so what does mysql return when the select query doesnt exist. So say I query the database: SELECT username FROM user WHERE username='test' AND password='test'<br />
<br />
Ok so say test doesnt exist what will the database return because i code in java and have made a method that should return true or false. True if the the thing exists in the query and false if it doesnt. But for some reason it always returns true. It turns out because mysql returns something each time.<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jakx12</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236046.html</guid>
		</item>
		<item>
			<title>how to get back my database with damaged wamp server??</title>
			<link>http://www.daniweb.com/forums/thread235883.html</link>
			<pubDate>Wed, 04 Nov 2009 07:40:26 GMT</pubDate>
			<description><![CDATA["My wamp server got damaged recently and i had no backup for my databases. I had reinstalled the wamp server and replaced the bin/mysql/data folder to the new one but I only get the database and not the tables inside it. I need help!!!!!!!! ";]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">&quot;My wamp server got damaged recently and i had no backup for my databases. I had reinstalled the wamp server and replaced the bin/mysql/data folder to the new one but I only get the database and not the tables inside it. I need help!!!!!!!! &quot;;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>sfsrocky</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235883.html</guid>
		</item>
		<item>
			<title>Remove last chars</title>
			<link>http://www.daniweb.com/forums/thread235757.html</link>
			<pubDate>Tue, 03 Nov 2009 20:40:37 GMT</pubDate>
			<description><![CDATA[Hello all, i would like to know how it is possible to remove for example last 20 characters, or by specifing the string to remove. 
For example i have 2 rows (in reality there are more than 100, thats why im not working it out by hand) with the next content: 
insert into abc (1,"hello...]]></description>
			<content:encoded><![CDATA[<div>Hello all, i would like to know how it is possible to remove for example last 20 characters, or by specifing the string to remove.<br />
For example i have 2 rows (in reality there are more than 100, thats why im not working it out by hand) with the next content:<br />
insert into abc (1,&quot;hello &lt;b&gt;b&lt;/b&gt;lol&quot;);<br />
insert into abc(2,&quot;bye &lt;b&gt;a&lt;/b&gt;lol&quot;);<br />
i would like to remove 3 last characters or the string &quot;lol&quot;.<br />
Thanks in advance.<br />
Have a good day.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jen140</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235757.html</guid>
		</item>
		<item>
			<title>How to store a big database</title>
			<link>http://www.daniweb.com/forums/thread235639.html</link>
			<pubDate>Tue, 03 Nov 2009 11:38:18 GMT</pubDate>
			<description><![CDATA[Hi and I have been working on a project involving a rather large database. My question is "For a database with over 20529860 rows, is it better to have 3330 tables spreaded equally or to split into multiple databases or would it be better to have 49950 tables in the database containing the...]]></description>
			<content:encoded><![CDATA[<div>Hi and I have been working on a project involving a rather large database. My question is &quot;For a database with over 20529860 rows, is it better to have 3330 tables spreaded equally or to split into multiple databases or would it be better to have 49950 tables in the database containing the information?&quot; The reason I ask is that having all those rows in the one table makes it really slow with the Where clause and I'm not sure which way is the best way to design this database with mysql. I found that anything over 15MB in one table takes too long to lookup so if I had to guess I would spread it over the 49950 tables ((255-33)*15*15) but sounds like a ridiculous number of tables to store the one set of data. <span style="font-weight:bold">So does anybody have any ideas on how to store potentially 1,000,000,000 rows in mysql.</span> Each row only contains a few bytes. Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>cwarn23</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235639.html</guid>
		</item>
		<item>
			<title>SQL statement for easier db a search</title>
			<link>http://www.daniweb.com/forums/thread235346.html</link>
			<pubDate>Mon, 02 Nov 2009 13:04:12 GMT</pubDate>
			<description>Hi. 
I have a web application whereby I perform  a search through 4 fields, namely:book serial no.,tel no.,gender and publishing date.In my jsp page variables picking the values respectively are:serial,tel,gender and datez.These are submitted to the java class.Currently, I perform my searches as...</description>
			<content:encoded><![CDATA[<div>Hi.<br />
I have a web application whereby I perform  a search through 4 fields, namely:book serial no.,tel no.,gender and publishing date.In my jsp page variables picking the values respectively are:serial,tel,gender and datez.These are submitted to the java class.Currently, I perform my searches as follows(in java class):<br />
/***********************************************/<br />
 <pre style="margin:20px; line-height:13px">//......after connecting to db and all that<br />
<br />
<br />
if(serial.equals(&quot;&quot;) )<br />
&nbsp;{<br />
&nbsp;if(!tel.equals(&quot;&quot;) )//<br />
&nbsp;{<br />
&nbsp; &nbsp; query = &quot;SELECT * FROM tbooks WHERE tbooks.tel=' &quot;+tel+&quot; ' &quot;;<br />
&nbsp;}<br />
&nbsp; else if(gender.equals(&quot;&quot;))<br />
&nbsp;{<br />
&nbsp;  query = &quot;SELECT * FROM tbooks WHERE tbooks.gender=' &quot;+gender+&quot; ' &quot;;<br />
&nbsp;}<br />
&nbsp; &nbsp; &nbsp; }//end if<br />
else if (!serial.equals(&quot;&quot;))<br />
{<br />
query = &quot;SELECT * FROM tbooks WHERE tbooks.serial=' &quot;+serial+&quot; ' &quot;;<br />
}<br />
<br />
//query is the statement to be executed later as&nbsp; <br />
//ResultSet rs = statement.executeQuery(query);<br />
// more code goes here.......</pre>/********************************************/<br />
The main question here is, Is there an SQL statement that works well in place of my nested if statements? (i.e if serial no is present ,tel is absent, gender is present and date is absent, then it brings results considering the present values only)....Kind of bringing results of .. <pre style="margin:20px; line-height:13px">SELECT * FROM tbooks WHERE serial = ' &quot;+serial+&quot; ' AND tel= ' &quot;+tel+&quot; ' AND gender= ' &quot;+gender+&quot; ' AND datez= ' &quot;+datez+&quot; '</pre>....even if one variable is null it considers only the non-empty variables.Thank you so much in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>dangari</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235346.html</guid>
		</item>
		<item>
			<title>SET datatype</title>
			<link>http://www.daniweb.com/forums/thread235319.html</link>
			<pubDate>Mon, 02 Nov 2009 10:45:47 GMT</pubDate>
			<description>hey.. 
 
i have a table with one column defined as SET 
somethin like (a,b,c) 
 
does anybody know the sql query to be run inorder to get elements like 
a 
b 
c  
all seperately so as to save it in an array in php script..??</description>
			<content:encoded><![CDATA[<div>hey..<br />
<br />
i have a table with one column defined as SET<br />
somethin like (a,b,c)<br />
<br />
does anybody know the sql query to be run inorder to get elements like<br />
a<br />
b<br />
c <br />
all seperately so as to save it in an array in php script..??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jyotidagia</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235319.html</guid>
		</item>
		<item>
			<title>Stored Procedures Help please</title>
			<link>http://www.daniweb.com/forums/thread235024.html</link>
			<pubDate>Sun, 01 Nov 2009 06:12:57 GMT</pubDate>
			<description>I have made stored procedures in Oracle...but need to export them to mysql. I have searched on google but cant figure out the syntax. 
 
Here is the oracle procedure: 
 
 
create or replace procedure delgroup 
(g_id in number) 
 
is</description>
			<content:encoded><![CDATA[<div>I have made stored procedures in Oracle...but need to export them to mysql. I have searched on google but cant figure out the syntax.<br />
<br />
Here is the oracle procedure:<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px">create or replace procedure delgroup<br />
(g_id in number)<br />
<br />
is<br />
<br />
begin<br />
<br />
DELETE FROM grouptable WHERE GROUP_ID=g_id;<br />
<br />
commit;<br />
end;</pre><br />
<br />
I jus basically want to delete the group from the group table..depending on which group id (the arguement) the user types in.<br />
<br />
How would i do this exact same procedure in mysql?<br />
<br />
Please some assistance guys :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>badmanmc</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235024.html</guid>
		</item>
		<item>
			<title>php mysql</title>
			<link>http://www.daniweb.com/forums/thread234662.html</link>
			<pubDate>Fri, 30 Oct 2009 10:52:05 GMT</pubDate>
			<description><![CDATA[could someone point out the error in the followin php/mysql code 
 
$strSearchVal = $_GET['q']; 
//database connection.. 
//... 
 
$strSQL = "SELECT DISTINCT area FROM hospital where area like '%'+ $strSearchVal; "; 
$result = mysql_query($strSQL); 
 
while ($arrThisRow = mysql_fetch_array($result...]]></description>
			<content:encoded><![CDATA[<div>could someone point out the error in the followin php/mysql code<br />
<br />
 <pre style="margin:20px; line-height:13px">$strSearchVal = $_GET&#91;'q'&#93;;<br />
//database connection..<br />
//...<br />
<br />
$strSQL = &quot;SELECT DISTINCT area FROM hospital where area like '%'+ $strSearchVal; &quot;;<br />
$result = mysql_query($strSQL);<br />
<br />
while ($arrThisRow = mysql_fetch_array($result )) {<br />
&nbsp;echo '&lt;li&gt;' . $arrThisRow&#91;'area'&#93; . '&lt;/li&gt;';</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jyotidagia</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234662.html</guid>
		</item>
		<item>
			<title>MySQL Query - Searching for multiple keywords</title>
			<link>http://www.daniweb.com/forums/thread234601.html</link>
			<pubDate>Fri, 30 Oct 2009 05:52:01 GMT</pubDate>
			<description>Hello, 
 
I have a two tables created to apply keywords to a given entry: 
 
Table:  File 
FileID (int, pk, auto incr) 
Name (varchar) 
 
Table File_Keyword 
KeywordID (int, pk, auto incr)</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I have a two tables created to apply keywords to a given entry:<br />
<br />
Table:  File<br />
FileID (int, pk, auto incr)<br />
Name (varchar)<br />
<br />
Table File_Keyword<br />
KeywordID (int, pk, auto incr)<br />
FileID (fk)<br />
Keyword (varchar)<br />
<br />
<br />
Given that I have a record in table File with 2 corresponding records in table File_Keyword assigning keywords &quot;ABC&quot; and &quot;XYZ&quot; to the given FileID.<br />
<br />
What is a simple sql query to only return results if both strings are matched:<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT file.FileID WHERE file.FileID=file_keyword.FileID AND (file_keyword.Keyword LIKE '%ABC%' AND file_keyword.Keyword LIKE '%XYZ%');</pre><br />
<br />
Any assistance would be appreciated.<br />
<br />
Thank you in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>aptitudedude</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234601.html</guid>
		</item>
		<item>
			<title>foreach tutorial</title>
			<link>http://www.daniweb.com/forums/thread234523.html</link>
			<pubDate>Thu, 29 Oct 2009 20:39:18 GMT</pubDate>
			<description><![CDATA[I have be struggling to turn the below while loop into a foreach loop with no result, so I am asking for help here on how to do this. 
   <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I have be struggling to turn the below while loop into a foreach loop with no result, so I am asking for help here on how to do this.<br />
  <pre style="margin:20px; line-height:13px">$query = &quot;Select * from TIME_TABLE Where<br />
Extract(month from DATE_FIELD ) = DATE_FORMAT(NOW(), '%c')<br />
and<br />
Extract(day from DATE_FIELD ) = DATE_FORMAT(NOW(), '%e')<br />
order by DATE_FIELD, DESCRIPTION&quot;;<br />
$result = $mysqli-&gt;query($query);<br />
<br />
while ($row = $result-&gt;fetch_array(MYSQLI_ASSOC)) {<br />
&nbsp; &nbsp; $dbItems .=&nbsp; &quot;&lt;item&gt; &lt;record_num&gt;&quot; . $row['RECORD_NUM'] . &quot;&lt;/record_num&gt;&quot; .<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;date_field&gt;&quot; .&nbsp;  $row['DATE_FIELD'] . &quot;&lt;/date_field&gt;&quot; .<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;description&gt;&quot; .&nbsp; $row['DESCRIPTION'] . &quot;&lt;/description&gt; &lt;/item&gt;&quot;;<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>rouse</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234523.html</guid>
		</item>
		<item>
			<title>SQL to return two of each value from table?</title>
			<link>http://www.daniweb.com/forums/thread234440.html</link>
			<pubDate>Thu, 29 Oct 2009 14:20:11 GMT</pubDate>
			<description><![CDATA[Hi everyone, 
 
I sat down to create a what I thought was simple SQL query but once I got thinking about it I realised I'm not sure where to start. 
 
The objective is to return two resorts from a Resorts table for each country code in that table.  
 
Countries table - Lists all countries 
Resorts...]]></description>
			<content:encoded><![CDATA[<div>Hi everyone,<br />
<br />
I sat down to create a what I thought was simple SQL query but once I got thinking about it I realised I'm not sure where to start.<br />
<br />
The objective is to return two resorts from a Resorts table for each country code in that table. <br />
<br />
Countries table - Lists all countries<br />
Resorts table - Lists resorts and what country code they have which links them to the Countries table.<br />
<br />
I've included a screenshot of what data is in the Resorts table. Basically I just need the two resort names from each country code. The other data can be ignored as it's just airport codes etc.<br />
 <br />
<br />
Any ideas to help me out?<br />
<br />
Many thanks for any help!</div>  <br /> <div style="padding:5px">    <fieldset class="fieldset"> <legend>Attached Images</legend> <table cellpadding="0" cellspacing="5" border="0"> <tr> <td><img class="inlineimg" src="http://www.daniweb.com/forums/images/attach/png.gif" alt="File Type: png" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="http://www.daniweb.com/forums/attachment.php?attachmentid=12367&amp;d=1256825864" target="_blank">Picture 1.png</a> (25.8 KB)</td> </tr> </table> </fieldset>   </div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>rickya100</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234440.html</guid>
		</item>
		<item>
			<title>Warning Code : 1265</title>
			<link>http://www.daniweb.com/forums/thread234131.html</link>
			<pubDate>Wed, 28 Oct 2009 16:11:41 GMT</pubDate>
			<description><![CDATA[I am receiving MySQL error 1265 when I try to insert records into a table and after googling this error I am no closer to understanding the problem. 
Here is the error message that is returned: 
Warning Code : 1265 
Data truncated for column 'DATE_FIELD' at row 1 
 
Here is the table definition: 
 ...]]></description>
			<content:encoded><![CDATA[<div>I am receiving MySQL error 1265 when I try to insert records into a table and after googling this error I am no closer to understanding the problem.<br />
Here is the error message that is returned:<br />
Warning Code : 1265<br />
Data truncated for column 'DATE_FIELD' at row 1<br />
<br />
Here is the table definition:<br />
 <pre style="margin:20px; line-height:13px">CREATE TABLE&nbsp; `test`.`TIME_TABLE` (<br />
`RECORD_NUM` INT( 6 ) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT&nbsp; 'Number of Records',<br />
`DATE_FIELD` DATE NOT NULL COMMENT&nbsp; 'Date of the event',<br />
`DESCRIPTION` VARCHAR( 1000 ) NOT NULL COMMENT&nbsp; 'Detail of the event'<br />
) ENGINE = MYISAM COMMENT =&nbsp; 'This day in history'<br />
<br />
Here is a typical insert:</pre>  <pre style="margin:20px; line-height:13px">INSERT INTO TIME_TABLE ( DATE_FIELD, DESCRIPTION ) VALUES ('28, October&nbsp; &nbsp; 1971' , 'Great Britain launched Prospero, the first of four X-3 satellites.');</pre><br />
When inspecting the table the DATE-FIELD is set to ‘0000-00-00’</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>rouse</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234131.html</guid>
		</item>
		<item>
			<title>Problems restoring mysql database backups</title>
			<link>http://www.daniweb.com/forums/thread234061.html</link>
			<pubDate>Wed, 28 Oct 2009 06:33:31 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I tried to restore my decompressed database *'cyberview_db_2809_2009-10-27_17h30m.Tuesday.sql'* 
 
using the command : 
 
 
---Quote--- 
mysql -h localhost -u root -proot123 info < /backups/daily/cyberview_db_2809/cyberview_db_2809_2009-10-27_17h30m.Tuesday.sql 
---End Quote---]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I tried to restore my decompressed database <span style="font-weight:bold">'cyberview_db_2809_2009-10-27_17h30m.Tuesday.sql'</span><br />
<br />
using the command :<br />
<br />
<div style="margin:20px; margin-top:5px; "> <div class="smallfont" style="margin-bottom:2px">Quote:</div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2"> <hr />  mysql -h localhost -u root -proot123 info &lt; /backups/daily/cyberview_db_2809/cyberview_db_2809_2009-10-27_17h30m.Tuesday.sql  <hr /> </td> </tr> </table> </div>but there was no restoration.<br />
<br />
I checked the <span style="font-weight:bold">/var/lib/mysql</span> directory where all restored databases are located, and in the 'info' folder, the only script that was available was 'db.opt'. Nothing else was created.<br />
<br />
Why is this? Pls help.<br />
<br />
Tqs.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Aigini</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234061.html</guid>
		</item>
		<item>
			<title>problem with wamp...</title>
			<link>http://www.daniweb.com/forums/thread234031.html</link>
			<pubDate>Wed, 28 Oct 2009 03:25:56 GMT</pubDate>
			<description><![CDATA[I installed WAMP5 1.7.0  
When I try to access localhost & phpmyadmin, it asks for a username and password.  
I'm pretty sure that  i didn't configured any. 
I  installed the same thing in another computer, and it worked. 
what could be the problem?]]></description>
			<content:encoded><![CDATA[<div>I installed WAMP5 1.7.0 <br />
When I try to access localhost &amp; phpmyadmin, it asks for a username and password. <br />
I'm pretty sure that  i didn't configured any.<br />
I  installed the same thing in another computer, and it worked.<br />
what could be the problem?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234031.html</guid>
		</item>
		<item>
			<title>how do i get started with MySQL</title>
			<link>http://www.daniweb.com/forums/thread233931.html</link>
			<pubDate>Tue, 27 Oct 2009 17:33:28 GMT</pubDate>
			<description>how do i get started with MySQL and get the command prompt like MySQL monitor to write the command for creating a database in MySQL?</description>
			<content:encoded><![CDATA[<div>how do i get started with MySQL and get the command prompt like MySQL monitor to write the command for creating a database in MySQL?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>romilc</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233931.html</guid>
		</item>
		<item>
			<title>News Story Amazon: New, Improved Cloud, Now With MySQL</title>
			<link>http://www.daniweb.com/news/story233896.html</link>
			<pubDate>Tue, 27 Oct 2009 15:08:11 GMT</pubDate>
			<description><![CDATA[At the risk of coming off like TV's "Mad Men (http://www.amctv.com/originals/madmen/)," Amazon Web Services really are New and Improved. The company today announced the addition of Amazon Relational Database Service (http://aws.amazon.com/rds/), giving users of Amazon's Elastic Compute Cloud (EC2)...]]></description>
			<content:encoded><![CDATA[<div>At the risk of coming off like TV's &quot;<a rel="nofollow" class="t" href="http://www.amctv.com/originals/madmen/" target="_blank">Mad Men</a>,&quot; Amazon Web Services really are New and Improved. The company today announced the addition of <a rel="nofollow" class="t" href="http://aws.amazon.com/rds/" target="_blank">Amazon Relational Database Service</a>, giving users of Amazon's Elastic Compute Cloud (EC2) access to a virtual instance of MySQL. That's the New part. Improvements include a family of high-memory instances and a price reduction of Linux-based EC2 compute time to 8.5 cents per hour from 10 cents. The 15 percent price drop takes effect Nov. 1.<br />
<br />
&quot;Many customers have told us that their applications require a relational database,&quot; said Adam Selipsky, vice president of <a rel="nofollow" class="t" href="http://aws.amazon.com/what-is-aws/" target="_blank">Amazon Web Services</a>, in a <a rel="nofollow" class="t" href="http://phx.corporate-ir.net/phoenix.zhtml?c=176060&amp;p=irol-newsArticle&amp;ID=1346525&amp;highlight=" target="_blank">statement</a>. &quot;That’s why we built <a rel="nofollow" class="t" href="http://aws.amazon.com/rds/" target="_blank">Amazon RDS</a>, which combines a familiar relational database with automated management and the instant scalability of the AWS cloud.&quot; Existing MySQL applications can be &quot;work seamlessly with Amazon RDS,&quot; according to claims, while the cloud automates common administrative tasks such as setup and provisioning, patch management and data backups, which are stored for a user-definable period. Database scaling--such as adding add more storage or changing to a larger or smaller DB Instance class-- can be executed with a single API call, the company said. Developers retain control of schema, indices and controls for performance tuning.<br />
<br />
For less complex database needs, Amazon also offers <a rel="nofollow" class="t" href="http://aws.amazon.com/simpledb/" target="_blank">SimpleDB</a>, with which applications can store and retrieve data using simple Web services requests. As with Amazon RDS, provisioning and maintenance are automatic, as are data indexing and backup. Amazon also provides &quot;geo-redundant replicas of the data,&quot; which keeps data available and helps improve performance. Scaling also is automated, the company said, as the cloud responds to changes in database traffic, and schema changes can be accomplished without changes to database code.<br />
<br />
Amazon charges no up-front fees for <a rel="nofollow" class="t" href="http://aws.amazon.com/" target="_blank">its Web services</a>; you pay only for the resources you use.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>EddieC</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233896.html</guid>
		</item>
		<item>
			<title>way to set a mysql status column</title>
			<link>http://www.daniweb.com/forums/thread233844.html</link>
			<pubDate>Tue, 27 Oct 2009 12:08:34 GMT</pubDate>
			<description>Hi there, 
 
I have 2 columns in my mysql table, (1) Status (2) Type. 
 
For the status column I would like to have one row with a STATUS of 1 (live).  And all the rest to have a STATUS of 0 (hidden). 
 
Is there a way to change a row to live and have the other one revert back to 0 in the same SQL...</description>
			<content:encoded><![CDATA[<div>Hi there,<br />
<br />
I have 2 columns in my mysql table, (1) Status (2) Type.<br />
<br />
For the status column I would like to have one row with a STATUS of 1 (live).  And all the rest to have a STATUS of 0 (hidden).<br />
<br />
Is there a way to change a row to live and have the other one revert back to 0 in the same SQL statement?  I only want to have one row active at a time.<br />
<br />
Also, I have 2 options to specify for TYPE column, would I be best to use enum for this column and how would a specify the correct syntax?<br />
<br />
My mysql knowledge is only basic.  Any help would be appreciated.<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>shaneog</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233844.html</guid>
		</item>
		<item>
			<title>Lots of questions about mysql</title>
			<link>http://www.daniweb.com/forums/thread233439.html</link>
			<pubDate>Mon, 26 Oct 2009 11:37:23 GMT</pubDate>
			<description>1. What types of data does the DBMS support? 
2. Does it support NULLS? 
3. What about Primary and Foreign Keys? 
4.Can you specify an index that is unique and then have the system enforce that? 
5. Does the DBMS support views? 
 
6. What type of data dictionary does the DBMS provide - is it...</description>
			<content:encoded><![CDATA[<div>1. What types of data does the DBMS support?<br />
2. Does it support NULLS?<br />
3. What about Primary and Foreign Keys?<br />
4.Can you specify an index that is unique and then have the system enforce that?<br />
5. Does the DBMS support views?<br />
<br />
6. What type of data dictionary does the DBMS provide - is it independent or integrated, in its association to a DBMS?<br />
7. Is it a simple catalog or is it more sophisticated with information about the types of programs that can access it?<br />
8. is it integrated with the non-procedural language?<br />
<br />
9. Does the DBMS support concurrent update (more than one user updating the database)?<br />
10. What is the unit that can be locked (field, row, table, etc.)?<br />
11.Are locks exclusive or shared? (Shared locks allow other users to read the data: with an exclusive lock, no other user can access the data in any way).<br />
12.Does the DBMS resolve deadlocks or must the programs do this?<br />
<br />
13.Does the database support replication?<br />
14.If so, does the DBMS allow partial replicas (copies of only selected rows and fields from tables), and how does the DBMS handle updates from two or more replicas?<br />
15.Can the DBMS distribute a database? (Divide into segments split over more than one sever).<br />
16. Does the DBMS provide procedural support for distributed databases?<br />
<br />
17.What limitations exist with respect to the number of tables, fields and rows per tables?<br />
18. How many files can be open at the same time? (In some DBMS's, each table and index is considered to be a separate file. Thus, a single table with three indexes, all in use at the same time, would account for four files).<br />
19. What type of operating system and hardware is supported?<br />
20. What types of LAN's can you use? (In a LAN, concurrent update is critical as many users may be updating the database at the same time).<br />
<br />
20.How well does the DBMS perform, where performance is a measure of how rapidly the DBMS completes it's tasks? <br />
21.Does the organisation have internal benchmarking standards to be met?<br />
22. Does the DBMS provide a performance monitor to measure the different types of performance whilst the DBMS is running?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>MuffinKun</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233439.html</guid>
		</item>
		<item>
			<title>mySQL permissions ... a few newbie questions</title>
			<link>http://www.daniweb.com/forums/thread233075.html</link>
			<pubDate>Sun, 25 Oct 2009 05:13:18 GMT</pubDate>
			<description><![CDATA[I haven't used the mySQL permissions mechanism to any great degree & could use a little help while still at the design stage. 
 
Is it possible to grant certain users access only to certain RECORDS within a table (based on the value of a field in those records). 
 
If not, I guess I have to use...]]></description>
			<content:encoded><![CDATA[<div>I haven't used the mySQL permissions mechanism to any great degree &amp; could use a little help while still at the design stage.<br />
<br />
Is it possible to grant certain users access only to certain RECORDS within a table (based on the value of a field in those records).<br />
<br />
If not, I guess I have to use separate tables or views for each user.<br />
<br />
Some initial guidance or links to reference material would be greatly appreciated.  TIA<br />
<br />
Edit: I am reading the manuals BTW - <a rel="nofollow" class="t" href="http://dev.mysql.com/doc/#manual" target="_blank">http://dev.mysql.com/doc/#manual</a></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>haggis-man</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233075.html</guid>
		</item>
		<item>
			<title>Special chars in Insert query...</title>
			<link>http://www.daniweb.com/forums/thread233042.html</link>
			<pubDate>Sun, 25 Oct 2009 02:38:08 GMT</pubDate>
			<description><![CDATA[Hello guys, how can to make correct query if in the typed values have a special chars (e.g. ' ") ? 
 
If the typed values have a one special char I know how to make the correct query, but if it have more then one special chars then I don't know how to make the correct query... can someone help me ?...]]></description>
			<content:encoded><![CDATA[<div>Hello guys, how can to make correct query if in the typed values have a special chars (e.g. ' &quot;) ?<br />
<br />
If the typed values have a one special char I know how to make the correct query, but if it have more then one special chars then I don't know how to make the correct query... can someone help me ?<br />
<br />
Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Krstevski</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233042.html</guid>
		</item>
		<item>
			<title>Query optimization</title>
			<link>http://www.daniweb.com/forums/thread232856.html</link>
			<pubDate>Sat, 24 Oct 2009 10:04:45 GMT</pubDate>
			<description><![CDATA[Hi all. 
I am writing a utility to manage virtual users on a mailserver w/ mysql backed. Unfortunately I am having performance issues when querying for the user's last access date/time. 
 
DB has this structure 
 
table *users* 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>Hi all.<br />
I am writing a utility to manage virtual users on a mailserver w/ mysql backed. Unfortunately I am having performance issues when querying for the user's last access date/time.<br />
<br />
DB has this structure<br />
<br />
table <span style="font-weight:bold">users</span><br />
 <pre style="margin:20px; line-height:13px">+------------------+-------------+------+-----+---------+-------+<br />
| Field&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Type&nbsp; &nbsp; &nbsp; &nbsp; | Null | Key | Default | Extra |<br />
+------------------+-------------+------+-----+---------+-------+<br />
| email&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | varchar(80) | NO&nbsp;  | PRI | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;  |<br />
| force_change_pwd | int(1)&nbsp; &nbsp; &nbsp; | NO&nbsp;  |&nbsp; &nbsp;  | 0&nbsp; &nbsp; &nbsp;  |&nbsp; &nbsp; &nbsp;  |<br />
| password&nbsp; &nbsp; &nbsp; &nbsp;  | md5(20)&nbsp; &nbsp;  | NO&nbsp;  |&nbsp; &nbsp;  | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;  |<br />
| creation_date&nbsp; &nbsp; | datetime&nbsp; &nbsp; | YES&nbsp; |&nbsp; &nbsp;  | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;  |<br />
+------------------+-------------+------+-----+---------+-------+</pre><br />
table <span style="font-weight:bold">user_activity</span><br />
<br />
 <pre style="margin:20px; line-height:13px">+----------------+--------------+------+-----+---------+----------------+<br />
| Field&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Type&nbsp; &nbsp; &nbsp; &nbsp;  | Null | Key | Default | Extra&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------+--------------+------+-----+---------+----------------+<br />
| id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | int(11)&nbsp; &nbsp; &nbsp; | NO&nbsp;  | PRI | NULL&nbsp; &nbsp; | auto_increment |<br />
| event&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | varchar(30)&nbsp; | NO&nbsp;  | MUL | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| username&nbsp; &nbsp; &nbsp;  | varchar(128) | NO&nbsp;  |&nbsp; &nbsp;  | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| domain&nbsp; &nbsp; &nbsp; &nbsp;  | varchar(128) | NO&nbsp;  | MUL | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| remote_address | varchar(255) | NO&nbsp;  |&nbsp; &nbsp;  | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| date&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | datetime&nbsp; &nbsp;  | NO&nbsp;  | MUL | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| comments&nbsp; &nbsp; &nbsp;  | varchar(255) | YES&nbsp; |&nbsp; &nbsp;  |&nbsp; &nbsp; &nbsp; &nbsp;  |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------+--------------+------+-----+---------+----------------+</pre><br />
<br />
In my PHP page, I have the following code<br />
<br />
 <pre style="margin:20px; line-height:13px">$mbox_users = 'SELECT email, creation_date FROM users ORDER BY email ASC';<br />
$result = mysql_query($mbox_users) or die (&quot;There was a problem with the SQL query: &quot; . mysql_error());<br />
while($row = mysql_fetch_assoc($result))<br />
{<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $email=$row['email'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; $date=$row['creation_date'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (is_null($date)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $date = &quot;N/A&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; $mbox_access=&quot;SELECT date FROM user_activity&nbsp; WHERE username = '&quot;.$row['email'].&quot;' ORDER BY date DESC LIMIT 1&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $result_access = mysql_query($mbox_access) or die (&quot;There was a problem with the SQL query: &quot; . mysql_error());<br />
&nbsp; &nbsp; &nbsp; &nbsp; $last = mysql_fetch_assoc($result_access);<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;li&gt;'.$email.' (&lt;b&gt;Created: &lt;/b&gt;'.$date.' - &lt;b&gt;Last Access: &lt;/b&gt;'.$last['date'].')&lt;/li&gt;';</pre><br />
<br />
Unfortunately with +20k users and over 100k records in the <span style="font-weight:bold">user_activity</span> table, the queries are awfully slow.<br />
Am I missing some obvious method of making the query faster?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>trashed</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232856.html</guid>
		</item>
		<item>
			<title>Inserting data to mysql database using php created form</title>
			<link>http://www.daniweb.com/forums/thread232496.html</link>
			<pubDate>Fri, 23 Oct 2009 04:14:07 GMT</pubDate>
			<description>Dear all, 
 
I am trying to submit my data on a php created form to mysql database where it is separate by 2 tables (device) and (location). 
 
As some of the devices shared the same location, 2 tables are created as below. 
For location table, i had created 2 fields: ID as (primary key) and area....</description>
			<content:encoded><![CDATA[<div>Dear all,<br />
<br />
I am trying to submit my data on a php created form to mysql database where it is separate by 2 tables (device) and (location).<br />
<br />
As some of the devices shared the same location, 2 tables are created as below.<br />
For location table, i had created 2 fields: ID as (primary key) and area.<br />
For device, i created 3 fields: ID (primary key), device_num and device_loc.<br />
<br />
Using php, i created a form where user will enter the device number and the location. <br />
<br />
The problem is i can insert the device number to my device table in mysql database and i have no idea how to link up the location table to my device table.  Appreciated if some help of advise is given to me. <br />
<br />
Below are the simple code of the insertion of my device table.<br />
<br />
 <pre style="margin:20px; line-height:13px">$val_d = $_POST['Device_num'];&nbsp; &nbsp; //value submit from user <br />
$val_l = $_POST['location_area'];&nbsp; //value submit from user <br />
<br />
$dev_insert = &quot;INSERT INTO device (device_id, device_num)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUES (NULL, '$val_d')&quot;;<br />
$results = mysql_query($dev_insert)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; or die (mysql_error());</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>futhonguy</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232496.html</guid>
		</item>
		<item>
			<title>SQL Server 2005 error</title>
			<link>http://www.daniweb.com/forums/thread232275.html</link>
			<pubDate>Thu, 22 Oct 2009 11:30:28 GMT</pubDate>
			<description><![CDATA[I am a new SQL user and I have created my code but when I execute it I get this error : 
 
Msg 2714, Level 16, State 6, Line 1 
There is already an object named 'Job_Title' in the database. 
 
I do not understand why I keep getting this same error.   
Here is my code: 
 
CREATE TABLE Job_Title 
(]]></description>
			<content:encoded><![CDATA[<div>I am a new SQL user and I have created my code but when I execute it I get this error :<br />
<br />
<span style="color:Red">Msg 2714, Level 16, State 6, Line 1<br />
There is already an object named 'Job_Title' in the database.</span><br />
<br />
I do not understand why I keep getting this same error.  <br />
Here is my code:<br />
<br />
 <pre style="margin:20px; line-height:13px">CREATE TABLE Job_Title<br />
(<br />
Job_ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL<br />
&nbsp; &nbsp; &nbsp; &nbsp; PRIMARY KEY(Job_ID),<br />
EEO1_Class&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(20)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Job_Title&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(40) NOT NULL,<br />
Job_Descrip&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(100)NOT NULL,<br />
Status&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(10)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL<br />
)<br />
<br />
CREATE TABLE Employee<br />
(<br />
Emp_ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL<br />
&nbsp; &nbsp; &nbsp; &nbsp; PRIMARY KEY(Emp_ID),<br />
Last_Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(50) NOT NULL,<br />
First_Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(50)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Address&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(50)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
City&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(25)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
State&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(20)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Phone_AC&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char(3)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Phone_Num&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char(7)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Ssn&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char(9)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Hire_Date&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; datetime&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Salary&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; numeric(6,2)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Gender&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(6)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Birthday&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; datetime&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Job_ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int&nbsp; &nbsp; &nbsp; &nbsp; FOREIGN KEY REFERENCES Job_Title (Job_ID)<br />
)</pre><br />
<br />
And a few examples of my INSERT statements:<br />
<br />
 <pre style="margin:20px; line-height:13px">INSERT INTO Employee (Emp_ID,Last_Name,First_Name,Address,City,State,Phone_AC,<br />
&nbsp; &nbsp; &nbsp; &nbsp; Phone_Num,Ssn,Hire_Date,Salary,Gender,Birthday,Job_ID)<br />
VALUES (62683,'Edelman','Glenn','175 Bishop Lane','La Jolla','California',619,555-0199,112333445,<br />
&nbsp; &nbsp; &nbsp; &nbsp; 10/07/2003,11.25,'male',11/02/1981,004)<br />
<br />
<br />
INSERT INTO Job_Title (Job_ID,EEO1_Class,Job_Title,Job_Descrip,Status)<br />
VALUES (001,'Office/Clerical','Accounting Clerk','Computes, classifies, records, and verifies numerical<br />
&nbsp; &nbsp; &nbsp; &nbsp; data for use in maintaining accounting records','NonExempt')</pre><br />
<br />
Thanks for your help!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>s28walters</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232275.html</guid>
		</item>
		<item>
			<title>Any experience with MySQL Dump Timer ?</title>
			<link>http://www.daniweb.com/forums/thread232202.html</link>
			<pubDate>Thu, 22 Oct 2009 07:22:09 GMT</pubDate>
			<description>Anyone has experince with MySQL Dump Timer tool ? 
I just download it from here :  
http://www.softwarevenue.com/download/mysql-dump-timer/ 
 
Is it good ? 
I have not install it yet, still looking for more information about this tool 
This is the sort description from the site : 
MySQL Backup /...</description>
			<content:encoded><![CDATA[<div>Anyone has experince with MySQL Dump Timer tool ?<br />
I just download it from here : <br />
<a rel="nofollow" class="t" href="http://www.softwarevenue.com/download/mysql-dump-timer/" target="_blank">http://www.softwarevenue.com/download/mysql-dump-timer/</a><br />
<br />
Is it good ?<br />
I have not install it yet, still looking for more information about this tool<br />
This is the sort description from the site :<br />
<span style="font-style:italic">MySQL Backup / MySQL Dump and MySQL Restore scheduler – local/ remote in the Web</span></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>sylstain</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232202.html</guid>
		</item>
		<item>
			<title>My data not appear</title>
			<link>http://www.daniweb.com/forums/thread232151.html</link>
			<pubDate>Thu, 22 Oct 2009 03:50:00 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div> <strong>MySQL Syntax</strong> (<a...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">&quot;SELECT tbl1.staff_ic, tbl1.staff_name, tbl2.dec_status,tbl4.location,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tbl3.post,tbl3.grade&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM staff_detail tbl1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN staff_declare tbl2<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON tbl1.staff_ic = tbl2.staff_ic<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN staff_post tbl3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON tbl1.staff_post = tbl3.num<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN staff_department tbl4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON tbl1.staff_dep = tbl4.no<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;;</pre>isn`t my coding is right?? why when i execute my command just certain data are appear and the rest not appear</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>aerliana</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232151.html</guid>
		</item>
		<item>
			<title>SQL Injection -measures for prevention</title>
			<link>http://www.daniweb.com/forums/thread232097.html</link>
			<pubDate>Wed, 21 Oct 2009 22:55:02 GMT</pubDate>
			<description><![CDATA[Hi, I'm making litle CMS with PHP+Mysql. Can you tellme measures for prevention  for SQL Injections ?]]></description>
			<content:encoded><![CDATA[<div>Hi, I'm making litle CMS with PHP+Mysql. Can you tellme measures for prevention  for SQL Injections ?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ultras1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232097.html</guid>
		</item>
		<item>
			<title>help - ordering</title>
			<link>http://www.daniweb.com/forums/thread232016.html</link>
			<pubDate>Wed, 21 Oct 2009 15:50:03 GMT</pubDate>
			<description><![CDATA[Hello! I need some help please.. 
 
i searched a lot, and tried everything... can someone help me please.. 
 
here's the deal: 
 
i have this select: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hello! I need some help please..<br />
<br />
i searched a lot, and tried everything... can someone help me please..<br />
<br />
here's the deal:<br />
<br />
i have this select:<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT * <br />
FROM localizacao, cliente, dispositivo&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
WHERE disp_id = clien_disp_id AND disp_id = local_disp_id <br />
ORDER BY local_id desc</pre><br />
it's output:<br />
<a rel="nofollow" class="t" href="http://i.imagehost.org/0746/tabela.jpg" target="_blank">http://i.imagehost.org/0746/tabela.jpg</a><br />
<br />
but what i really want is:<br />
<br />
i want to select my client's, but where local_id is the last id i receive.. but i don't wanna show repetitive client's, i just want to show the last local_id for each client....<br />
<span style="font-weight:bold">i want like to show only this ones: <a rel="nofollow" class="t" href="http://i.imagehost.org/0883/tabela2.jpg" target="_blank">http://i.imagehost.org/0883/tabela2.jpg</a> in the red circle</span><br />
<br />
you know what i mean? <br />
it's like two order by's but not showing repetitive client's... i tried distinct... but maybe im making it wrong..<br />
<br />
help :s<br />
<br />
thanks a lot</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>gpss</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232016.html</guid>
		</item>
		<item>
			<title>Selecting a certain number of results from a specified row</title>
			<link>http://www.daniweb.com/forums/thread231923.html</link>
			<pubDate>Wed, 21 Oct 2009 10:06:07 GMT</pubDate>
			<description><![CDATA[As the title says, I'd like to select a certain number of rows from a table starting from a specified row. 
 
So for example, I have a table with 250 rows and the rows are numbered incrementally using a column called 'ref'. I now want to select rows 51-100. How would I go about doing that?]]></description>
			<content:encoded><![CDATA[<div>As the title says, I'd like to select a certain number of rows from a table starting from a specified row.<br />
<br />
So for example, I have a table with 250 rows and the rows are numbered incrementally using a column called 'ref'. I now want to select rows 51-100. How would I go about doing that?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Venom Rush</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231923.html</guid>
		</item>
		<item>
			<title>challenging query - Insert On duplicate field?  not on duplicate key</title>
			<link>http://www.daniweb.com/forums/thread231865.html</link>
			<pubDate>Wed, 21 Oct 2009 06:38:57 GMT</pubDate>
			<description>I want to insert multiple records or update those records if 2 specific column values do not exist in a record.  But the 2 values are NOT UNIQUE, so I can not use ON DUPLICATE KEY.  I am trying to not use IF...Then statements.  It seems to be bad programming practice. 
 
Here is the pseudo code of...</description>
			<content:encoded><![CDATA[<div>I want to insert multiple records or update those records if 2 specific column values do not exist in a record.  But the 2 values are NOT UNIQUE, so I can not use ON DUPLICATE KEY.  I am trying to not use IF...Then statements.  It seems to be bad programming practice.<br />
<br />
Here is the pseudo code of what I want to accomplish.<br />
<br />
 <pre style="margin:20px; line-height:13px">INSERT INTO interest_list (user_id, interest_id, details)<br />
&nbsp; VALUES<br />
&nbsp; (1, 1,'somestring1'),<br />
&nbsp; (1, 2, 'somestring2'), <br />
&nbsp;...etc<br />
<span style="color:Red">IF the record exists where (user_id==1 and interest_id==1) or (user_id==1 and interest_id==2)&nbsp; ... etc THEN (dont insert but rather update)</span><br />
UPDATE interest_list<br />
&nbsp; &nbsp; SET details = CASE interest_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHEN 1 THEN 'somestring1'<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHEN 2 THEN 'somestring2'<br />
...etc<br />
&nbsp; &nbsp; END<br />
WHERE interest_id IN (1,2...etc) AND user_id=1;</pre><br />
Its fairly complicated to explain, hopefully someone gets my question.  I am trying to accomplish this in 1 query.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ucud</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231865.html</guid>
		</item>
		<item>
			<title>How to insert date in string format into MYSQL table as DATE data type</title>
			<link>http://www.daniweb.com/forums/thread231445.html</link>
			<pubDate>Mon, 19 Oct 2009 17:29:25 GMT</pubDate>
			<description>Hello people, 
 
Well The problem that I am facing is: 
I have a date in string format like 30 Jun 2009, how can I insert it into MYSQL table as DATE data type?  
 
I created the table and declare data type for Date column as DATE, when I insert 30 Jun 2009 as a value into the table, it becomes...</description>
			<content:encoded><![CDATA[<div>Hello people,<br />
<br />
Well The problem that I am facing is:<br />
I have a date in string format like 30 Jun 2009, how can I insert it into MYSQL table as DATE data type? <br />
<br />
I created the table and declare data type for Date column as DATE, when I insert 30 Jun 2009 as a value into the table, it becomes 00:00:00. What should I do to avoid this error.  Please suggest. Thanks<br />
<br />
Ajay</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ajay_p5</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231445.html</guid>
		</item>
		<item>
			<title>Newbie Help with SQL Filter/Search</title>
			<link>http://www.daniweb.com/forums/thread231422.html</link>
			<pubDate>Mon, 19 Oct 2009 15:21:29 GMT</pubDate>
			<description><![CDATA[Hi all,  
 
I'm a newbie in sql, please can someone help me out in constructing a query. What I want to achieve is to have filter/search menu with a list of the different options/optionsvalues that applies to a particular category of products and a count of the products that possess each attribute....]]></description>
			<content:encoded><![CDATA[<div>Hi all, <br />
<br />
I'm a newbie in sql, please can someone help me out in constructing a query. What I want to achieve is to have filter/search menu with a list of the different options/optionsvalues that applies to a particular category of products and a count of the products that possess each attribute.<br />
Say under COLOR we have Black (2), Blue(17), Green(21) and under SIZE we have 10m(11), 20m(15). My tables areas follows:<br />
<br />
categories =&gt; catid, parentid<br />
products =&gt; productid, catid<br />
options =&gt; optionsid, options_name (e.g Colour, Size)<br />
optionsvalues =&gt; optionsvaluesid, optionsvalues_name (e.g Black, Blue, Green, 10m, 20m, 30m)<br />
options2optionsvalues =&gt;options2optionsvaluesid, optionsid, optionsvaluesid<br />
products_attributes =&gt; attributeid, productid, catid, optionsid, optionsvaluesid<br />
<br />
I really need your help.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Vikk</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231422.html</guid>
		</item>
		<item>
			<title>Connection Issues with SSH</title>
			<link>http://www.daniweb.com/forums/thread231273.html</link>
			<pubDate>Mon, 19 Oct 2009 01:20:19 GMT</pubDate>
			<description><![CDATA[MySQL database server is running on ubuntu. I have installed an GUI for everybody in office to access the database called Navicat. It uses ssh to access the database. It was working on almost everybody's machine week back. Now its not working on few machines and I am not sure about the reason for...]]></description>
			<content:encoded><![CDATA[<div>MySQL database server is running on ubuntu. I have installed an GUI for everybody in office to access the database called Navicat. It uses ssh to access the database. It was working on almost everybody's machine week back. Now its not working on few machines and I am not sure about the reason for this. <br />
-I checked the connections details <br />
-The ipconfig /all shows the same dns server and gateways on computers working and not working.<br />
-I disabled all the firewalls and aniviruses on both the server and the client machine but still it is not working. I was working on that machine a week ago.<br />
I was not able to figure out the reason. Please let me know if you have any suggestions.<br />
<br />
The second problem is that I need to give remote access. I was wanting to open up the router port for this purpose which is not opening. I am not sure if this is the right way to do it from a security standpoint. Please let know if you have any views on this as well.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>zackkv</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231273.html</guid>
		</item>
		<item>
			<title>Need help with primary keys in a many-to-many schema</title>
			<link>http://www.daniweb.com/forums/thread231035.html</link>
			<pubDate>Sat, 17 Oct 2009 20:48:14 GMT</pubDate>
			<description><![CDATA[Hello, 
 
I'll preface by saying this is a school project.  I just need to be pointed in the right direction. 
 
I'm trying to develop a database of books.  In and of itself, that's simple enough, but I'm also trying to implement a tagging system following this solution...]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I'll preface by saying this is a school project.  I just need to be pointed in the right direction.<br />
<br />
I'm trying to develop a database of books.  In and of itself, that's simple enough, but I'm also trying to implement a tagging system following <a rel="nofollow" class="t" href="http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html#toxi" target="_blank">this solution</a>.<br />
<br />
Where I'm getting tripped up is with the fact that their solution uses one column as primary key per table.  In order to prevent duplicate books from being added to my database, I'm thinking it would make sense for my primary key in the Books table to consist of both the Author name as well as the Title (since the same author can write more than one book, and different authors can write similarly-titled books, but no one author is going to write two books with the same title).  The other two tables (Tags and TagMap) will only use a single-column primary key.<br />
<br />
Would the linked solution work if the &quot;Bookmark&quot; table used a two-column primary key?<br />
<br />
If not, do you have any better ideas for designing a table for books that would use a single-column primary key yet also prevent entry of duplicates?  ISBN is not an option since many of the books in the table are independently published and are not registered.<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>statutoryape</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231035.html</guid>
		</item>
		<item>
			<title>A specific Narrow-Down Filter using MySQL</title>
			<link>http://www.daniweb.com/forums/thread230366.html</link>
			<pubDate>Thu, 15 Oct 2009 10:52:50 GMT</pubDate>
			<description>Hi, 
 
Check out http://www.landwatch.com/Land_For_Sale 
 
Notice the filters on the left column and how they all have the count of the entries within them. I am sure they are not calculating all these count at the run-time. They have these values stored somewhere and just retrieving the top 5...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
Check out <a rel="nofollow" class="t" href="http://www.landwatch.com/Land_For_Sale" target="_blank">http://www.landwatch.com/Land_For_Sale</a><br />
<br />
Notice the filters on the left column and how they all have the count of the entries within them. I am sure they are not calculating all these count at the run-time. They have these values stored somewhere and just retrieving the top 5 values. Not sure how this can be done. Any insight?<br />
<br />
I hear that datacubes with all these dimensions can give this result instantaneously. But I'd like to think there's an easier solution.<br />
<br />
Help!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>dipaq1976</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread230366.html</guid>
		</item>
		<item>
			<title>SQL Script</title>
			<link>http://www.daniweb.com/forums/thread230304.html</link>
			<pubDate>Thu, 15 Oct 2009 07:15:04 GMT</pubDate>
			<description>How can I create a SQL Script using MySql? 
 
I already created a database and tables. I populated the tables and wrote queries to solve the questions in my homework. But the professor want me to submit the SQL script. 
 
Can anyone help me?</description>
			<content:encoded><![CDATA[<div>How can I create a SQL Script using MySql?<br />
<br />
I already created a database and tables. I populated the tables and wrote queries to solve the questions in my homework. But the professor want me to submit the SQL script.<br />
<br />
Can anyone help me?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Samyx</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread230304.html</guid>
		</item>
		<item>
			<title>newbie mysql join help</title>
			<link>http://www.daniweb.com/forums/thread230177.html</link>
			<pubDate>Wed, 14 Oct 2009 18:09:36 GMT</pubDate>
			<description>I need a bit of help with a mysql join query.  I have tried and tried and keep getting unhelpful errors. 
 
I have two mysql tables: 
 
friends: 
   friend1  INT 
   friend2  INT 
 
members: 
   member_id  INT</description>
			<content:encoded><![CDATA[<div>I need a bit of help with a mysql join query.  I have tried and tried and keep getting unhelpful errors.<br />
<br />
I have two mysql tables:<br />
<br />
friends:<br />
   friend1  INT<br />
   friend2  INT<br />
<br />
members:<br />
   member_id  INT<br />
   name    varchar<br />
   lname  varchar<br />
<br />
<br />
Basically I want to loop through friends and find all records where friend1 is my member_id and then get the details for friend2 from the members file. I need a query that will return the data in members IF members.member_id  = friends.friend2 AND where friends.friend1 = 1.<br />
<br />
Can any one help me here?  I think if I could get the basic down I can expand from there, but dang if I am getting nowhere on this join &lt;g&gt;</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>andym67</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread230177.html</guid>
		</item>
		<item>
			<title>email users when new record is added</title>
			<link>http://www.daniweb.com/forums/thread230010.html</link>
			<pubDate>Wed, 14 Oct 2009 04:42:48 GMT</pubDate>
			<description>Hi, 
 
Basically what im looking to implement is a function where a user performs a search on my site, and is presented with the results and an option to be emailed similar items in future. 
 
I have all the search stuff done, but have no idea where to start on the email me similar items in future...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
Basically what im looking to implement is a function where a user performs a search on my site, and is presented with the results and an option to be emailed similar items in future.<br />
<br />
I have all the search stuff done, but have no idea where to start on the email me similar items in future part.<br />
<br />
Any help much appreciated</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>stylemessiah</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread230010.html</guid>
		</item>
		<item>
			<title>Inner Joins</title>
			<link>http://www.daniweb.com/forums/thread229956.html</link>
			<pubDate>Tue, 13 Oct 2009 22:47:10 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div> <strong>MySQL Syntax</strong> (<a...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">&lt;?php<br />
<br />
$host='localhost';<br />
&nbsp; &nbsp; &nbsp; &nbsp; $user='root';<br />
&nbsp; &nbsp; &nbsp; &nbsp; $pass='';<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; //establish database connection<br />
&nbsp; &nbsp; &nbsp; &nbsp; $conn=mysql_connect($host,$user,$pass) or die('Unable to connect');<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; //select database for use<br />
&nbsp; &nbsp; mysql_select_db('acumenchain') or die('Unable to select database!');<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $query2 = &quot;SELECT tblclasslist.studentNo <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM acumenchain.tblclasslist <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JOIN acumenchain.tblregistration <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON tblclasslist.studentNo = tblclasslist.studentNo&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $result = mysql_query($query2) or die('Unable to execute Query' . mysql_error());<br />
&nbsp; &nbsp; &nbsp; &nbsp; $num = mysql_num_rows($result);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //close connection<br />
&nbsp; &nbsp; mysql_close($conn);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
?&gt;</pre><br />
database name : acumenchain<br />
Under my tblclasslist is studentNo (primary key).<br />
Under my tblregistration is studentNo (primary key) and pword<br />
Under my tbllogin is studentNo (primary key) and pword.<br />
<br />
<span style="font-weight:bold">Objectives:</span><ul><li>I want that only students who are registered in the tblclasslist can register on tblregistration.</li>
<li>I want that only who are registered can log-in to my site using his/her studentNo and pword.</li>
</ul>Thanks:confused:</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>theo19</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229956.html</guid>
		</item>
		<item>
			<title>Capacity of datatypes???</title>
			<link>http://www.daniweb.com/forums/thread229760.html</link>
			<pubDate>Tue, 13 Oct 2009 08:56:54 GMT</pubDate>
			<description>I want to find the capacity of my data fields....how can i calculate capacity of varchar(10)  or int(15)...????  (in kilobytes s or megabytes s) 
please help..t 
hankx in advance.</description>
			<content:encoded><![CDATA[<div>I want to find the capacity of my data fields....how can i calculate capacity of varchar(10)  or int(15)...????  (in kilobytes s or megabytes s)<br />
please help..t<br />
hankx in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229760.html</guid>
		</item>
		<item>
			<title>Are websites like daniweb suppose to keep user history log for a amount of time?</title>
			<link>http://www.daniweb.com/forums/thread229678.html</link>
			<pubDate>Tue, 13 Oct 2009 01:38:12 GMT</pubDate>
			<description><![CDATA[I'm trying to find out what the legal laws for the internet are on storing text via e-mail/chat. I am not sure if there is such a law but than again it's better to ask than to find out the hard way. Does DaniWeb keep history of Private messages for a certain amount of time? Is there a government or...]]></description>
			<content:encoded><![CDATA[<div>I'm trying to find out what the legal laws for the internet are on storing text via e-mail/chat. I am not sure if there is such a law but than again it's better to ask than to find out the hard way. Does DaniWeb keep history of Private messages for a certain amount of time? Is there a government or some official webpage that lists the laws on what data you are legally suppose to keep or aren't suppose to keep as a website owner that allows users to have their own accounts?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>the_programmer</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229678.html</guid>
		</item>
		<item>
			<title>Help desiging mysql table tree structure</title>
			<link>http://www.daniweb.com/forums/thread229666.html</link>
			<pubDate>Tue, 13 Oct 2009 01:07:18 GMT</pubDate>
			<description><![CDATA[I currently have a table structure like this 
 
create table main(id int(10) unsigned NOT NULL AUTO_INCREMENT, fname varchar(25) NOT NULL DEFAULT '', `uid` int(10) unsigned NOT NULL,  PRIMARY KEY (`id`)) 
 
insert into main(1, 'abcd', 1), (2,'doll',1), (3,'animals',1) 
 
CREATE TABLE category ( 
 ...]]></description>
			<content:encoded><![CDATA[<div>I currently have a table structure like this<br />
<br />
 <pre style="margin:20px; line-height:13px">create table main(id int(10) unsigned NOT NULL AUTO_INCREMENT, fname varchar(25) NOT NULL DEFAULT '', `uid` int(10) unsigned NOT NULL,&nbsp; PRIMARY KEY (`id`))<br />
<br />
insert into main(1, 'abcd', 1), (2,'doll',1), (3,'animals',1)<br />
<br />
CREATE TABLE category (<br />
&nbsp; `cid` int(3) NOT NULL AUTO_INCREMENT,<br />
&nbsp; `id` int(2) NOT NULL DEFAULT '0',<br />
&nbsp; `category` varchar(25) NOT NULL DEFAULT '',<br />
&nbsp; PRIMARY KEY (`cid`)<br />
) <br />
<br />
insert into category(1,1,'abcd1'), (2,2,'doll1')</pre><br />
Table category is related to table main. main=&gt;category<br />
<br />
I need 3 level nesting<br />
<br />
main=&gt;category=&gt;subcat1=&gt;subcat2<br />
<br />
How do i modify the table structure?<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>newtojsp</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229666.html</guid>
		</item>
		<item>
			<title>Best way to save image submitted via a form</title>
			<link>http://www.daniweb.com/forums/thread229356.html</link>
			<pubDate>Sun, 11 Oct 2009 20:24:57 GMT</pubDate>
			<description>Hi, 
I am creating a website where users will be able to submit forms. In the form they will be able to submit text and uploaded images. With regards to uploaded images, once they are submitted, what is the best way to save them? Is it to a MySQL database or save it to the disk itself.  
Could...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am creating a website where users will be able to submit forms. In the form they will be able to submit text and uploaded images. With regards to uploaded images, once they are submitted, what is the best way to save them? Is it to a MySQL database or save it to the disk itself. <br />
Could someone give an example of whichever way is the best way? Any help is appreciated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>waleed66</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229356.html</guid>
		</item>
		<item>
			<title>Mysql select tip</title>
			<link>http://www.daniweb.com/forums/thread229254.html</link>
			<pubDate>Sun, 11 Oct 2009 07:55:54 GMT</pubDate>
			<description><![CDATA[Hai,  
 
I had a mysql database and it contain columns like "id" and "name". 
 
I am using the following query for selecting a name with an id . 
 
My code is 
 
$row=mysql_select("SELECT * FROM table where id='1'") or die(mysql_error()); 
$result=mysql_fetch_array($ROW);]]></description>
			<content:encoded><![CDATA[<div>Hai, <br />
<br />
I had a mysql database and it contain columns like &quot;id&quot; and &quot;name&quot;.<br />
<br />
I am using the following query for selecting a name with an id .<br />
<br />
My code is<br />
<br />
 <pre style="margin:20px; line-height:13px">$row=mysql_select(&quot;SELECT * FROM table where id='1'&quot;) or die(mysql_error());<br />
$result=mysql_fetch_array($ROW);<br />
<br />
$name=$result['name'];</pre><br />
<br />
It works and my problem is please let me know whether it is the easy way ? Or there is any other way to do this ?<br />
<br />
<br />
Thanks in advance<br />
Rajeesh</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>rajeesh_rsn</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229254.html</guid>
		</item>
		<item>
			<title>mysql query</title>
			<link>http://www.daniweb.com/forums/thread229137.html</link>
			<pubDate>Sat, 10 Oct 2009 16:27:37 GMT</pubDate>
			<description><![CDATA[hello 
 
i'm beginner with php/mysql on windows xp platform 
 
i've worked with ms sql server in which we have query analyser to work with queries, i am not familier with running queries on my sql 
 
i've installed mysql-essential-5.1.39-win32 from 
http://dev.mysql.com/downloads/mysql/5.1.html 
...]]></description>
			<content:encoded><![CDATA[<div>hello<br />
<br />
i'm beginner with php/mysql on windows xp platform<br />
<br />
i've worked with ms sql server in which we have query analyser to work with queries, i am not familier with running queries on my sql<br />
<br />
i've installed mysql-essential-5.1.39-win32 from<br />
<a rel="nofollow" class="t" href="http://dev.mysql.com/downloads/mysql/5.1.html" target="_blank">http://dev.mysql.com/downloads/mysql/5.1.html</a><br />
<br />
but do not know how to operate with it<br />
<br />
please help</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>dips255</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229137.html</guid>
		</item>
		<item>
			<title>how to save link in database</title>
			<link>http://www.daniweb.com/forums/thread229132.html</link>
			<pubDate>Sat, 10 Oct 2009 16:08:13 GMT</pubDate>
			<description><![CDATA[hi dear, 
i'm going to develop database that can access file in the user profile folder. but, i dun know how to create link in database mysql. i have 5 field in database.username,password,email and file. file contain link that access the file in file://C. i dont know how to do dat. please ya help...]]></description>
			<content:encoded><![CDATA[<div>hi dear,<br />
i'm going to develop database that can access file in the user profile folder. but, i dun know how to create link in database mysql. i have 5 field in database.username,password,email and file. file contain link that access the file in file://C. i dont know how to do dat. please ya help me here<br />
bye dear</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>nazarahmat</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229132.html</guid>
		</item>
		<item>
			<title>is one database for images for all users the best idea?</title>
			<link>http://www.daniweb.com/forums/thread229042.html</link>
			<pubDate>Sat, 10 Oct 2009 06:09:01 GMT</pubDate>
			<description><![CDATA[hey; 
I'm creating a image database. I want each user to register, login and be able to upload images. I however, do not know if each user needs to have their own database for images to be stored in or if I can grab the image via foreign ids from one big database. I don't want users to open their...]]></description>
			<content:encoded><![CDATA[<div>hey;<br />
I'm creating a image database. I want each user to register, login and be able to upload images. I however, do not know if each user needs to have their own database for images to be stored in or if I can grab the image via foreign ids from one big database. I don't want users to open their album and see someone elses images... that wouldn't be good! Any help is appreciated!!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>the_programmer</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229042.html</guid>
		</item>
		<item>
			<title>Question about 2 overlapping many-to-many lookup tables</title>
			<link>http://www.daniweb.com/forums/thread229014.html</link>
			<pubDate>Sat, 10 Oct 2009 03:07:44 GMT</pubDate>
			<description><![CDATA[I am updating a conference website, and I've come across a design problem that has me stumped. I have tables for: 
-a company's account 
-person (each company can have many persons in its account) 
-conference sections (for example, 1-day, 2-day, or 3-day attendance) 
-a lookup table relating...]]></description>
			<content:encoded><![CDATA[<div>I am updating a conference website, and I've come across a design problem that has me stumped. I have tables for:<br />
-a company's account<br />
-person (each company can have many persons in its account)<br />
-conference sections (for example, 1-day, 2-day, or 3-day attendance)<br />
-a lookup table relating people to sections (this would allow a company to have 3 people attend this year, but then only send 2 of those 3 next year, for instance)<br />
<br />
Here are abbreviated CREATE statements:<br />
<br />
 <pre style="margin:20px; line-height:13px">CREATE&nbsp; TABLE IF NOT EXISTS `accounts` (<br />
&nbsp; `account_id` INT(10) NOT NULL AUTO_INCREMENT ,<br />
&nbsp; `username` VARCHAR(255) NOT NULL ,<br />
&nbsp; `password` CHAR(64) NULL ,<br />
&nbsp; `email` VARCHAR(255) NOT NULL ,<br />
&nbsp; `company` VARCHAR(255) NULL ,<br />
&nbsp; PRIMARY KEY (`account_id`) )&nbsp; (... remainder of CREATE statement omitted)<br />
<br />
<br />
CREATE&nbsp; TABLE IF NOT EXISTS `persons` (<br />
&nbsp; `person_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,<br />
&nbsp; `firstname` VARCHAR(45) NOT NULL ,<br />
&nbsp; `lastname` VARCHAR(45) NOT NULL ,<br />
&nbsp; `jobtitle` VARCHAR(255) NULL DEFAULT NULL ,<br />
&nbsp; `phone` CHAR(12) NULL DEFAULT NULL ,<br />
&nbsp; `email` VARCHAR(255) NOT NULL ,<br />
&nbsp; PRIMARY KEY (`person_id`) ,<br />
&nbsp; INDEX `fk_person_account` (`account_id` ASC) ,<br />
&nbsp; CONSTRAINT `fk_person_account`<br />
&nbsp; &nbsp; FOREIGN KEY (`account_id` )&nbsp; &nbsp; (... remainder of CREATE statement omitted)<br />
<br />
CREATE&nbsp; TABLE IF NOT EXISTS `sections` (<br />
&nbsp; `section_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,<br />
&nbsp; `name` VARCHAR(255) NOT NULL ,<br />
&nbsp; `startdate` DATE NULL ,<br />
&nbsp; `enddate` DATE NULL ,<br />
&nbsp; `base_price` INT(10) NOT NULL DEFAULT 0 ,<br />
&nbsp; PRIMARY KEY (`section_id`)&nbsp; &nbsp;  (... remainder of CREATE statement omitted)<br />
<br />
CREATE&nbsp; TABLE IF NOT EXISTS `person_attending_section` (<br />
&nbsp; `person_id` INT(10) UNSIGNED NOT NULL ,<br />
&nbsp; `section_id` INT(10) UNSIGNED NOT NULL ,<br />
&nbsp; PRIMARY KEY (`person_id`, `section_id`) ,<br />
&nbsp; INDEX `fk_person_has_section_person1` (`person_id` ASC) ,<br />
&nbsp; INDEX `fk_person_has_section_section1` (`section_id` ASC) ,<br />
&nbsp; CONSTRAINT `fk_person_has_section_person1`<br />
&nbsp; &nbsp; FOREIGN KEY (`person_id` )<br />
&nbsp; &nbsp; REFERENCES `persons` (`person_id` )<br />
&nbsp; &nbsp; ON DELETE NO ACTION<br />
&nbsp; &nbsp; ON UPDATE NO ACTION,<br />
&nbsp; CONSTRAINT `fk_person_has_section_section1`<br />
&nbsp; &nbsp; FOREIGN KEY (`section_id` )<br />
&nbsp; &nbsp; REFERENCES `sections` (`section_id` )<br />
&nbsp; &nbsp; ON DELETE NO ACTION<br />
&nbsp; &nbsp; ON UPDATE NO ACTION)<br />
ENGINE = InnoDB</pre><br />
<br />
Here's the problem:  I'd like to have an `orders` table that takes an account's `persons` who have been added to the `persons_attending_section` for this year's sections and allows the account holder to &quot;check out&quot; and pay for all those registrations. (Refunds, if necessary, would be handled off-line.) Then, if more people from that company want to attend, they could be added and &quot;checked out&quot; as a second, and separate order. After the conference is over, those orders would be locked. An account could copy an order from the previous year, but that will involve checking out again, and it will create another order for the account.<br />
<br />
I've thought about something like this:<br />
 <pre style="margin:20px; line-height:13px">CREATE&nbsp; TABLE IF NOT EXISTS `orders` (<br />
&nbsp; `orders_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,<br />
&nbsp; `account_id` INT NOT NULL ,<br />
&nbsp; `created_on` DATETIME NOT NULL ,<br />
&nbsp; `person_id` INT(10) UNSIGNED NOT NULL ,<br />
&nbsp; `section_id` INT(10) UNSIGNED NOT NULL ,<br />
&nbsp; PRIMARY KEY (`orders_id`) )</pre><br />
with appropriate foreign keys, and just copying over person_id and section_id from all the appropriate rows of the `person_attending_section` table, but that seems inelegant and error-prone.<br />
<br />
Should I just create an artificial, auto-increment primary key for the `person_attending_section` table and have the other two keys just be foreign keys--then I could treat that table like an &quot;ordered items&quot; table from a static e-commerce style database?<br />
<br />
Any suggestions would be appreicated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>vjwilson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229014.html</guid>
		</item>
		<item>
			<title>server RAM to be increased</title>
			<link>http://www.daniweb.com/forums/thread228905.html</link>
			<pubDate>Fri, 09 Oct 2009 15:21:22 GMT</pubDate>
			<description>Hi  
   Following is server information 
 
OS version:Linux playpen 2.6.18-6-amd64 #1 SMP Thu Dec 25 21:08:54 UTC 2008 x86_64 GNU/Linux 
 
64 bit OS 
 
MySQL version 
mysql  Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (x86_64) using readline 5.2</description>
			<content:encoded><![CDATA[<div>Hi <br />
   Following is server information<br />
<br />
OS version:Linux playpen 2.6.18-6-amd64 #1 SMP Thu Dec 25 21:08:54 UTC 2008 x86_64 GNU/Linux<br />
<br />
64 bit OS<br />
<br />
MySQL version<br />
mysql  Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (x86_64) using readline 5.2<br />
<br />
By using TOP command mysql is allocated 4.5G and using upto 58.5 %<br />
<br />
Database size 150GB<br />
Innodb_buffer_pool_size=4GB<br />
Max connection =500  avg used connection 201<br />
<br />
Current query_cache_size = 16 M<br />
Current query_cache_used = 14 M<br />
<br />
!!] Query cache efficiency: 15.6% (3M cached / 23M selects)<br />
[!!] Query cache prunes per day: 3551088<br />
[!!] InnoDB data size / buffer pool: 104.3G/4.0G<br />
[!!] Maximum possible memory usage: 36.4G (467% of installed RAM)<br />
Physical Memory 8G<br />
 Reads / Writes: 86% / 14%<br />
<br />
server Information<br />
<br />
playpen:~# free -m<br />
             total       used       free     shared    buffers     cached<br />
Mem:          7988       3155       4832          0         66       1547<br />
-/+ buffers/cache:       1541       6447<br />
Swap:        16383         43      16340<br />
<br />
for top command<br />
<br />
      USER      PR   NI VIRT RES  SHR  S  CPU%  % MEM   TIME    COMMAND <br />
 1841 root      15   0 4903m 4.5g 4340 S  229    58.0   3835:26  mysqld<br />
<br />
PLEASE RECOMMEND SHOULD 8 GB RAM BE INCREASED ?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ankur02018</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228905.html</guid>
		</item>
		<item>
			<title><![CDATA[MySql Service doesn't run]]></title>
			<link>http://www.daniweb.com/forums/thread228749.html</link>
			<pubDate>Fri, 09 Oct 2009 04:15:19 GMT</pubDate>
			<description><![CDATA[Hi Everybody.. I installed wamp server and Mysql services doesn't start. I've found on Google Search. and nothing to solve my problem. Can anyone help me? Thanks..]]></description>
			<content:encoded><![CDATA[<div>Hi Everybody.. I installed wamp server and Mysql services doesn't start. I've found on Google Search. and nothing to solve my problem. Can anyone help me? Thanks..</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Zero13</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228749.html</guid>
		</item>
		<item>
			<title>Trouble using ORDER BY in a UNION statement</title>
			<link>http://www.daniweb.com/forums/thread228581.html</link>
			<pubDate>Thu, 08 Oct 2009 13:55:35 GMT</pubDate>
			<description><![CDATA[As the title suggests, I'm having trouble sorting the results of a union statement. I'm trying to sort the results by date descending and it's coming out ascending. 
 
 
(SELECT a, b, c, d, e, f, date FROM table1 WHERE a=10 AND b=1) UNION (SELECT a, b, c, d, e, f, date FROM table1 WHERE a=11 AND...]]></description>
			<content:encoded><![CDATA[<div>As the title suggests, I'm having trouble sorting the results of a union statement. I'm trying to sort the results by date descending and it's coming out ascending.<br />
<br />
 <pre style="margin:20px; line-height:13px">(SELECT a, b, c, d, e, f, date FROM table1 WHERE a=10 AND b=1) UNION (SELECT a, b, c, d, e, f, date FROM table1 WHERE a=11 AND b=1) ORDER BY date DESC;</pre>I'm selecting all the same rows from the same table. The reason I'm using a UNION statement is because I have 3 different WHERE conditions.<br />
<br />
This really should work and I've gone over my code with a fine tooth comb. It's driving me crazy. Anyone have any suggestions?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Venom Rush</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228581.html</guid>
		</item>
		<item>
			<title>Help with generating a unique number</title>
			<link>http://www.daniweb.com/forums/thread228469.html</link>
			<pubDate>Thu, 08 Oct 2009 02:38:04 GMT</pubDate>
			<description><![CDATA[hello, 
 
    I'm trying to create a database in SQL Server management Studio for a project.  I have created a tabel named Employee and I have 14 columns.  I need to set the firts column (Emp_ID) as Primary Key (accomplished) and then generate a unique number for each Emp_ID that I insert. ...]]></description>
			<content:encoded><![CDATA[<div>hello,<br />
<br />
    I'm trying to create a database in SQL Server management Studio for a project.  I have created a tabel named Employee and I have 14 columns.  I need to set the firts column (Emp_ID) as Primary Key (accomplished) and then generate a unique number for each Emp_ID that I insert.  currently I have no information in my database I'm stuck in finding the procedure to correctly code the SQL statement that will generate a unique Emp_ID when I insert new values or add a new row of information.  Can someone please help?  I&quot;ve look all over my text and searched the web and cannot find something useful to help.<br />
<br />
thanks in advance</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>kevlam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228469.html</guid>
		</item>
		<item>
			<title>Help...! (Sub Query)</title>
			<link>http://www.daniweb.com/forums/thread228423.html</link>
			<pubDate>Wed, 07 Oct 2009 22:01:31 GMT</pubDate>
			<description><![CDATA[hi to all, 
 
this might be very simple, but i don;t know how to get correct output, someone help me to complete it... 
 
*1st i need to get result from this query* 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>hi to all,<br />
<br />
this might be very simple, but i don;t know how to get correct output, someone help me to complete it...<br />
<br />
<span style="font-weight:bold">1st i need to get result from this query</span><br />
 <pre style="margin:20px; line-height:13px">$sql=&quot;SELECT * FROM $tbl1_name WHERE sex='$show_all'&quot;;<br />
$result=mysql_query($sql);</pre>this'll result either all the boys or all the girls;<br />
<br />
<span style="font-weight:bold">from the above result again i need select according to their age using this 2nd query.</span><br />
 <pre style="margin:20px; line-height:13px">$sql=&quot;SELECT * FROM $tbl1_name WHERE age BETWEEN '$from' AND '$to'&quot;;<br />
$result=mysql_query($sql);</pre><br />
<br />
Help me to do this in single subquery...<br />
<br />
Thanx in advance...</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>nadnakinam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228423.html</guid>
		</item>
		<item>
			<title>problem with highest date</title>
			<link>http://www.daniweb.com/forums/thread228334.html</link>
			<pubDate>Wed, 07 Oct 2009 13:38:58 GMT</pubDate>
			<description>hello im studying dba, right now im stuck with project i have to do. 
Here is what bothers me. 
i have 2 tables one with tasks and one with salarys. 
Task table describes who is working on what from when how many hours on so on. Salarys gives me info on how much ppl earn per hour and so on. Nothing...</description>
			<content:encoded><![CDATA[<div>hello im studying dba, right now im stuck with project i have to do.<br />
Here is what bothers me.<br />
i have 2 tables one with tasks and one with salarys.<br />
Task table describes who is working on what from when how many hours on so on. Salarys gives me info on how much ppl earn per hour and so on. Nothing strange so far.<br />
SO i started to calculate hours spend on task * salary per hour under chosen time period. ANd here comes the catch. Person recieved rise in salary and query automaticly adds 2 values of salary per hour on same project.<br />
 lets say 2008-01-01 salary was 100 and in 2008-05-01 120 those 2 records are in table with diff id.So i should have 213 hours spend on project but now i have 426 hours. Is there any way to chose highest salary with help of a date wich is correct to chosen time period ?<br />
lest say time period 2008-01-01 to 08-01-30 i can chose max(date) but i need some kind of statement that max date cant be higher then chosen time period. i was trying with<br />
<br />
 <pre style="margin:20px; line-height:13px">and cos_tasks.task_start_date between '2008-01-01' and '2009-08-30'<br />
and cos_salaries.salary_startdate &lt;= cos_tasks.task_start_date</pre><br />
problem is after this person got more salary andi change time period for longer one statement is true for 2 options so old salary and new salary are calculated.<br />
<br />
thank you.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>czekonq</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228334.html</guid>
		</item>
		<item>
			<title>including SP in dts package</title>
			<link>http://www.daniweb.com/forums/thread228295.html</link>
			<pubDate>Wed, 07 Oct 2009 10:54:31 GMT</pubDate>
			<description>While creating a DTS package i want to include a Stored Procedure with input parameters? Can any help in this.</description>
			<content:encoded><![CDATA[<div>While creating a DTS package i want to include a Stored Procedure with input parameters? Can any help in this.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>carobee</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228295.html</guid>
		</item>
		<item>
			<title>Recent Interview Question</title>
			<link>http://www.daniweb.com/forums/thread228081.html</link>
			<pubDate>Tue, 06 Oct 2009 15:44:55 GMT</pubDate>
			<description>I was asked Suppose there is table A in DB,Suppose when we update that table,whose are two tables(Magic tables) that are updated other than table A?</description>
			<content:encoded><![CDATA[<div>I was asked Suppose there is table A in DB,Suppose when we update that table,whose are two tables(Magic tables) that are updated other than table A?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>sonia sardana</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228081.html</guid>
		</item>
		<item>
			<title>How to create multiple tables</title>
			<link>http://www.daniweb.com/forums/thread228039.html</link>
			<pubDate>Tue, 06 Oct 2009 12:27:08 GMT</pubDate>
			<description>I want to create two tables with names group,phone 
group contains id,name,place,phone numbers 
phone contains id,phone numbers 
my query is that phone table should accept id and phone numbers that matches group table(id and phone numbers) can one please help me .</description>
			<content:encoded><![CDATA[<div>I want to create two tables with names group,phone<br />
group contains id,name,place,phone numbers<br />
phone contains id,phone numbers<br />
my query is that phone table should accept id and phone numbers that matches group table(id and phone numbers) can one please help me .</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>madhav089</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228039.html</guid>
		</item>
		<item>
			<title>how to record 3-digit zeros</title>
			<link>http://www.daniweb.com/forums/thread227984.html</link>
			<pubDate>Tue, 06 Oct 2009 07:29:43 GMT</pubDate>
			<description><![CDATA[Okay idk if it's possible but I want one of my fields to have 000 as a default value and to maintain this value whenever called for. Like if I use PHP to run a query that asks for that field I want it to return "000". I'm doing this coz I'm playing with version records here. 
 
OK so there's this...]]></description>
			<content:encoded><![CDATA[<div>Okay idk if it's possible but I want one of my fields to have 000 as a default value and to maintain this value whenever called for. Like if I use PHP to run a query that asks for that field I want it to return &quot;000&quot;. I'm doing this coz I'm playing with version records here.<br />
<br />
OK so there's this thing called Zerofill, but I want it a little different. I want this field to be able to store INTEGER(5), but default value &quot;000&quot;, a three-digit zeros. So if user do not enter any number, it will be &quot;000&quot;, but user MAY enter up to 5 digits....</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>AdventDeo</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227984.html</guid>
		</item>
		<item>
			<title>how to create table relate with other table</title>
			<link>http://www.daniweb.com/forums/thread227967.html</link>
			<pubDate>Tue, 06 Oct 2009 05:28:56 GMT</pubDate>
			<description>I am creating two tables with names group,phone  
group caontains id,name,place,phone numbers 
phone contains id,phone numbers   
my query is that phone table should accept  id and phone numbers that matches group table(id and phone numbers) can one please help me .</description>
			<content:encoded><![CDATA[<div>I am creating two tables with names group,phone <br />
group caontains id,name,place,phone numbers<br />
phone contains id,phone numbers  <br />
my query is that phone table should accept  id and phone numbers that matches group table(id and phone numbers) can one please help me .</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>madhav089</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227967.html</guid>
		</item>
		<item>
			<title>Search in string</title>
			<link>http://www.daniweb.com/forums/thread227811.html</link>
			<pubDate>Mon, 05 Oct 2009 14:12:51 GMT</pubDate>
			<description><![CDATA[Hi to All. 
I have this code: 
$query = " SELECT *FROM tabela WHERE persons LIKE '%$search%'For example I have row in persons column which contains "John William Smith"  
If I type in search filed "John William" or "William Smith" it will return result. But how to make to return result if I type...]]></description>
			<content:encoded><![CDATA[<div>Hi to All.<br />
I have this code:<br />
 <pre style="margin:20px; line-height:13px">$query = &quot; SELECT *FROM tabela WHERE persons LIKE '%$search%'</pre>For example I have row in persons column which contains &quot;John William Smith&quot; <br />
If I type in search filed &quot;John William&quot; or &quot;William Smith&quot; it will return result. But how to make to return result if I type &quot;John Smith&quot; in search box.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ultras1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227811.html</guid>
		</item>
		<item>
			<title>Trigger????</title>
			<link>http://www.daniweb.com/forums/thread227687.html</link>
			<pubDate>Mon, 05 Oct 2009 04:27:58 GMT</pubDate>
			<description><![CDATA[I use mysql to store some time values (infact 2 at a time) 
Startime & end time....  in two columns. 
 
 I have another column called duration which stores the diffrerce of the above two time values...  
 
I want to fill that third column(duration) when I insert the values to the first 2 columns.....]]></description>
			<content:encoded><![CDATA[<div>I use mysql to store some time values (infact 2 at a time)<br />
Startime &amp; end time....  in two columns.<br />
<br />
 I have another column called duration which stores the diffrerce of the above two time values... <br />
<br />
I want to fill that third column(duration) when I insert the values to the first 2 columns..<br />
<br />
I think that can be done through a trigger.. how can I do that??<br />
(I dnt knw how to write a trigger...or wat it reallly does is!!!!!!)<br />
<br />
please help.....<br />
<br />
(I use java for the application. if this should be solved through java plz let me knw)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227687.html</guid>
		</item>
		<item>
			<title>password for phpmyadmin</title>
			<link>http://www.daniweb.com/forums/thread227678.html</link>
			<pubDate>Mon, 05 Oct 2009 03:46:16 GMT</pubDate>
			<description>I want to set a password to *phpmyadmin interface* in WAMP.. 
How can I do that?? 
  
I jst want to make sure that no one will change my databases using  
Phpmyadmin GUI ..()  mysql console is ok..... 
 
thankx in advance..</description>
			<content:encoded><![CDATA[<div>I want to set a password to <span style="font-weight:bold">phpmyadmin interface</span> in WAMP..<br />
How can I do that??<br />
 <br />
I jst want to make sure that no one will change my databases using <br />
Phpmyadmin GUI ..()  mysql console is ok.....<br />
<br />
thankx in advance..</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227678.html</guid>
		</item>
		<item>
			<title>Beginning MySQL with Java</title>
			<link>http://www.daniweb.com/forums/thread227662.html</link>
			<pubDate>Mon, 05 Oct 2009 01:39:06 GMT</pubDate>
			<description><![CDATA[Hello everyone =)  I'm a Java programmer who wants to do work with databases.  MySQL seems to be a popular choice, but I don't know where to start.  I messed around with Derby, but I didn't really understand what was going on.  If anyone could point me in the direction of a good tutorial for MySQL...]]></description>
			<content:encoded><![CDATA[<div>Hello everyone =)  I'm a Java programmer who wants to do work with databases.  MySQL seems to be a popular choice, but I don't know where to start.  I messed around with Derby, but I didn't really understand what was going on.  If anyone could point me in the direction of a good tutorial for MySQL through Java, that would be awesome =)<br />
<br />
Thank you!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>llemes4011</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227662.html</guid>
		</item>
		<item>
			<title>help with mysql SELECT statement</title>
			<link>http://www.daniweb.com/forums/thread227511.html</link>
			<pubDate>Sun, 04 Oct 2009 01:11:41 GMT</pubDate>
			<description><![CDATA[how do i select a row in a table  columns i dont know the name of(and find the name of it)? but i know the cell/field of the  column has a  value of "55" 
i also have to EXCLUDE ONE COLUMN that i know the name of. 
 
does anyone know how to make the select statement that seleects all the columns...]]></description>
			<content:encoded><![CDATA[<div>how do i select a row in a table  columns i dont know the name of(and find the name of it)? but i know the cell/field of the  column has a  value of &quot;55&quot;<br />
i also have to EXCLUDE ONE COLUMN that i know the name of.<br />
<br />
does anyone know how to make the select statement that seleects all the columns with the value of 55. i only know the name of the column i want to exclude from the search.<br />
?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>SKANK!!!!!</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227511.html</guid>
		</item>
		<item>
			<title>create table problems</title>
			<link>http://www.daniweb.com/forums/thread227477.html</link>
			<pubDate>Sat, 03 Oct 2009 19:06:47 GMT</pubDate>
			<description><![CDATA[can someone help me identify the syntax error with this code 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help...]]></description>
			<content:encoded><![CDATA[<div>can someone help me identify the syntax error with this code<br />
 <pre style="margin:20px; line-height:13px">CREATE&nbsp; TABLE IF NOT EXISTS Persons <br />
(&nbsp; id_number VARCHAR(13) NOT NULL <br />
&nbsp; &nbsp; ,&nbsp; name VARCHAR(45) NOT NULL <br />
&nbsp; &nbsp; ,&nbsp; name_2 VARCHAR(45) NULL <br />
&nbsp; &nbsp; ,&nbsp; name_3 VARCHAR(45) NULL <br />
&nbsp; &nbsp; ,&nbsp; surname VARCHAR(45) NOT NULL <br />
&nbsp; &nbsp; ,&nbsp; date_created DATE<br />
&nbsp; &nbsp; ,&nbsp; date_modified DATE<br />
&nbsp; &nbsp; ,&nbsp; PRIMARY KEY (id_number) <br />
&nbsp; &nbsp; ,&nbsp; INDEX per_id_fk (id_number ASC) <br />
&nbsp; &nbsp; ,&nbsp; INDEX per_stat_fk (id_number ASC) <br />
&nbsp; &nbsp; ,&nbsp; CONSTRAINT per_id_fk&nbsp; &nbsp; FOREIGN KEY (id_number )&nbsp; &nbsp; REFERENCES Person_Image (id_number )&nbsp; &nbsp; ON DELETE CASCADE&nbsp; &nbsp; ON UPDATE CASCADE<br />
&nbsp; &nbsp; ,&nbsp; CONSTRAINT per_stat_fk&nbsp; &nbsp; FOREIGN KEY (id_number )&nbsp; &nbsp; REFERENCES Current_Status (id_number )&nbsp; &nbsp; ON DELETE CASCADE&nbsp; &nbsp; ON UPDATE CASCADE<br />
)</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>baki100</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227477.html</guid>
		</item>
		<item>
			<title>finding the largest numbers</title>
			<link>http://www.daniweb.com/forums/thread227289.html</link>
			<pubDate>Fri, 02 Oct 2009 19:25:40 GMT</pubDate>
			<description><![CDATA[hi all 
could any 1 help me out. 
im trying to find the biggest id number in a db. 
the problem is that the "ID" column is saved as "TEXT"(its important to me). 
the language im using is PHP. 
10x! 
 
tried to use this but it didnt work 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>hi all<br />
could any 1 help me out.<br />
im trying to find the biggest id number in a db.<br />
the problem is that the &quot;ID&quot; column is saved as &quot;TEXT&quot;(its important to me).<br />
the language im using is PHP.<br />
10x!<br />
<br />
tried to use this but it didnt work<br />
 <pre style="margin:20px; line-height:13px">$resultt = mysql_query(&quot;SELECT MAX(id) FROM object&quot; , $conn);<br />
$row = mysql_fetch_array($resultt);<br />
$num=$row[maxnum];</pre>[/code]</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>severman</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227289.html</guid>
		</item>
		<item>
			<title>Compare and update products pricing columns</title>
			<link>http://www.daniweb.com/forums/thread227195.html</link>
			<pubDate>Fri, 02 Oct 2009 09:35:13 GMT</pubDate>
			<description>Hi Guys  
 
Firstly: 
 
Is it possible to import two columns from an excel sheet into two new columns in a mysql database?  
 
I would like to import new product codes(prodcode2) and pricing(prodsupplyprice2) into these two columns and then set up a query to do the folowing... 
 
I need to compare...</description>
			<content:encoded><![CDATA[<div>Hi Guys <br />
<br />
Firstly:<br />
<br />
Is it possible to import two columns from an excel sheet into two new columns in a mysql database? <br />
<br />
I would like to import new product codes(<span style="color:Green">prodcode2</span>) and pricing(<span style="color:Green">prodsupplyprice2</span>) into these two columns and then set up a query to do the folowing...<br />
<br />
I need to compare original product codes column(<span style="color:Green">prodcode</span>) with the new imported product code column(<span style="color:Green">prodcode2</span>) and if the same code is present anywhere in the two columns, update the products price(<span style="color:Green">prodsupplyprice</span>) with the newly imported price(<span style="color:Green">prodsupplyprice2</span>). <br />
<br />
This becomes challange because most of the time the product codes are not lined up next to each other and are unordered.<br />
<br />
I figure you need to use a <span style="color:Green">SELECT</span> statement and <span style="color:Green">MATCH</span> statement to select the matching codes and maybe reorder (<span style="color:Green">prodcode2</span>) to line up with (<span style="color:Green">prodcode</span>)<br />
<br />
From there you just use the <span style="color:Green">UPDATE</span> statement to change the prices.<br />
<br />
How I see it:<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT * FROM products WHERE MATCH (prodcode) AGAINST (prodcode2);</pre>How? This doenst work, I have tried combinations and sometimes get a FULLTEXT error..? <br />
<br />
Then, need to somehow reorder corrisponding codes next to each other... How?<br />
<br />
Then<br />
 <pre style="margin:20px; line-height:13px">UPDATE `products` SET `prodsupplytprice` = (`prodsupplyprice2`) WHERE `prodsupplyprice2` &gt; 0 ;</pre><br />
Any help on this would be greatly appreciated and could save me HOURS updating prices... or if there is a better way of doing this please let me know :)<br />
<br />
Many Thanks<br />
Marc</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>mls880</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227195.html</guid>
		</item>
		<item>
			<title>Mysql query</title>
			<link>http://www.daniweb.com/forums/thread227190.html</link>
			<pubDate>Fri, 02 Oct 2009 09:20:57 GMT</pubDate>
			<description>Hai, 
 
I am developing a home appliances website. I had a detail database. Which stored the details of all the items in that shop. The columns are Id number, name, price, type, made, date. 
 
When user clicks on the TV menu in the website then the lists of TV in that shop will show. I did that...</description>
			<content:encoded><![CDATA[<div>Hai,<br />
<br />
I am developing a home appliances website. I had a detail database. Which stored the details of all the items in that shop. The columns are Id number, name, price, type, made, date.<br />
<br />
When user clicks on the TV menu in the website then the lists of TV in that shop will show. I did that using the mysql query like this<br />
<br />
 <pre style="margin:20px; line-height:13px">select * from data_base where type=&quot;TV&quot;;</pre><br />
Working fine. Now I need to do a filter search in this page. That is I need to show a list/menu in that page showing all the TV brands in that shop. <br />
How to display all the brands from a database like this <br />
<br />
Type----------------Brand----------------Model No<br />
TV----------------Sony	----------------510<br />
TV ----------------AKAI----------------120<br />
TV----------------Sony	----------------150<br />
TV----------------SAMSUNG----------------840<br />
TV ----------------Sony----------------170<br />
<br />
Simply I need to display all the tv brands without repeating the name. If I will use this query models will repeat<br />
<br />
 <pre style="margin:20px; line-height:13px">select &quot;Brand&quot; from data_base where type=&quot;tv&quot;;</pre><br />
ie the result will be like this<br />
<br />
Sony	<br />
AKAI<br />
Sony<br />
SAMSUNG<br />
Sony<br />
<br />
But I want a result like this<br />
<br />
Sony<br />
AKAI<br />
SAMSUNG<br />
<br />
<br />
Thanks in advance<br />
Rajeesh</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>rajeesh_rsn</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227190.html</guid>
		</item>
		<item>
			<title>retrieve the last record???</title>
			<link>http://www.daniweb.com/forums/thread227186.html</link>
			<pubDate>Fri, 02 Oct 2009 09:15:13 GMT</pubDate>
			<description>How to write a query to retrieve the *last record* that is entered. ???</description>
			<content:encoded><![CDATA[<div>How to write a query to retrieve the <span style="font-weight:bold">last record</span> that is entered. ???</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227186.html</guid>
		</item>
		<item>
			<title>Need to sum distinct rows, not distinct values</title>
			<link>http://www.daniweb.com/forums/thread227151.html</link>
			<pubDate>Fri, 02 Oct 2009 04:44:30 GMT</pubDate>
			<description>I have a somewhat complicated select query which returns, in part, the following resultset (as an example): 
 
 
threadid	views 
--------	----- 
1	5 
1	5 
2	10 
3	15 
4	10</description>
			<content:encoded><![CDATA[<div>I have a somewhat complicated select query which returns, in part, the following resultset (as an example):<br />
<br />
 <pre style="margin:20px; line-height:13px">threadid&nbsp; &nbsp; &nbsp; &nbsp; views<br />
--------&nbsp; &nbsp; &nbsp; &nbsp; -----<br />
1&nbsp; &nbsp; &nbsp; &nbsp; 5<br />
1&nbsp; &nbsp; &nbsp; &nbsp; 5<br />
2&nbsp; &nbsp; &nbsp; &nbsp; 10<br />
3&nbsp; &nbsp; &nbsp; &nbsp; 15<br />
4&nbsp; &nbsp; &nbsp; &nbsp; 10</pre><br />
If I were to do the following select:<br />
 <pre style="margin:20px; line-height:13px">COUNT (DISTINCT threadid), SUM (DISTINCT views)</pre>then it would return 4, 30. (5 + 10 + 15)<br />
<br />
I am looking for a select where I want to find the SUM of views for distinct threadids, not distinct views. Something that would return 4, 40. (5 + 10 + 15 + 10) Is there something I can do?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>cscgal</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227151.html</guid>
		</item>
		<item>
			<title><![CDATA[Can't insert record into mySQL database]]></title>
			<link>http://www.daniweb.com/forums/thread227059.html</link>
			<pubDate>Thu, 01 Oct 2009 17:10:51 GMT</pubDate>
			<description><![CDATA[Hi there 
 
Completely stumped on the simplest of things... 
 
Here is my PHP code: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code...]]></description>
			<content:encoded><![CDATA[<div>Hi there<br />
<br />
Completely stumped on the simplest of things...<br />
<br />
Here is my PHP code:<br />
<br />
 <pre style="margin:20px; line-height:13px">&lt;?php<br />
<br />
//includes the connection parameters from external file<br />
<br />
require_once('connection.php');<br />
<br />
// Receive the variables<br />
$fname = $_POST['fname'];<br />
$lname = $_POST['lname'];<br />
$email = $_POST['email'];<br />
$ip = gethostbyname($_SERVER['REMOTE_ADDR']);<br />
<br />
// Establish connection with database<br />
$connect = mysql_connect($hostname, $username, $password) or die(&quot;Could not connect to localhost&quot;);<br />
<br />
// Select database<br />
$select = mysql_select_db($database, $connect) or die(&quot;Could not find database.&quot;);<br />
<br />
// Insert data to database<br />
$sql = mysql_query(&quot;INSERT INTO tc_mailist ('fname', 'lname', 'email', 'ip') VALUES ('Joe', 'Bloggs', 'joe@bloggs.com', $ip)&quot;);<br />
<br />
if(!$sql) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; die(&quot;Nope&quot;);<br />
} else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;1 record added&quot;;<br />
}<br />
<br />
mysql_close($connect);<br />
?&gt;</pre><br />
$sql step doesn't seem to work no matter how I change the formatting.<br />
<br />
No literature I've read seems to help.  Any ideas?<br />
<br />
Thanks!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>keira23</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227059.html</guid>
		</item>
		<item>
			<title>Designing a database</title>
			<link>http://www.daniweb.com/forums/thread226949.html</link>
			<pubDate>Thu, 01 Oct 2009 05:48:37 GMT</pubDate>
			<description><![CDATA[Hi  
I was searching through the net and found this exciting web-development forum. 
I need to design a database for "problem" section --one of the tab in our website. 
The contents are  
It has got Table of contents: list of all chapters 
chapter 1 - chapter 16 and each chapter has got 3 different...]]></description>
			<content:encoded><![CDATA[<div>Hi <br />
I was searching through the net and found this exciting web-development forum.<br />
I need to design a database for &quot;problem&quot; section --one of the tab in our website.<br />
The contents are <br />
It has got Table of contents: list of all chapters<br />
chapter 1 - chapter 16 and each chapter has got 3 different sections and each section has got around 20 problems.<br />
<br />
The administrator/user operation will be editing,saving and updating those questions.Further Administrator can add few question if he wants as well change the solutions required.<br />
<br />
Can you tell me the best database desing ..how the fields should b?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>srinivas.k</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226949.html</guid>
		</item>
		<item>
			<title>enabling relations in phpmyadmin</title>
			<link>http://www.daniweb.com/forums/thread226769.html</link>
			<pubDate>Wed, 30 Sep 2009 11:59:21 GMT</pubDate>
			<description><![CDATA[i want to relate my tables, but i can't find out how to relate the tables. 
 
how?]]></description>
			<content:encoded><![CDATA[<div>i want to relate my tables, but i can't find out how to relate the tables.<br />
<br />
how?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>scias23</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226769.html</guid>
		</item>
		<item>
			<title>Time ?</title>
			<link>http://www.daniweb.com/forums/thread226741.html</link>
			<pubDate>Wed, 30 Sep 2009 10:19:41 GMT</pubDate>
			<description><![CDATA[I stored two time values in mysql data as 'starttime' & 'endtime'. 
I have another column to store the' duration '(which will contain 'endtime-starttime') 
 
Is there a way to add values to ' duration ' automatically when I insert values to 'start time' & 'end time'.   
I use WAMP ..I wanna do it...]]></description>
			<content:encoded><![CDATA[<div>I stored two time values in mysql data as 'starttime' &amp; 'endtime'.<br />
I have another column to store the' duration '(which will contain 'endtime-starttime')<br />
<br />
Is there a way to add values to ' duration ' automatically when I insert values to 'start time' &amp; 'end time'.  <br />
I use WAMP ..I wanna do it through Mysql....rather than through application...<br />
<br />
Is it possible.... how?<br />
<br />
thankx in advance.<br />
<br />
(All the columns contain  datatype 'time')</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226741.html</guid>
		</item>
		<item>
			<title>MySQL where statement - comparing attributes from two differen tables</title>
			<link>http://www.daniweb.com/forums/thread226374.html</link>
			<pubDate>Mon, 28 Sep 2009 18:35:53 GMT</pubDate>
			<description><![CDATA[I am trying something like this but the syntax is wrong. 
 
INSERT INTO bookingsA(task,date) 
VALUES ('test','2009-01-01') 
WHERE date != tableB.date; 
How do I do this? Do we use :: instead? 
 
Mike]]></description>
			<content:encoded><![CDATA[<div>I am trying something like this but the syntax is wrong.<br />
<br />
 <pre style="margin:20px; line-height:13px">INSERT INTO bookingsA(task,date)<br />
VALUES ('test','2009-01-01')<br />
WHERE date != tableB.date;</pre><br />
How do I do this? Do we use :: instead?<br />
<br />
Mike</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>MikeGore</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226374.html</guid>
		</item>
		<item>
			<title>help with searching in mysql</title>
			<link>http://www.daniweb.com/forums/thread226369.html</link>
			<pubDate>Mon, 28 Sep 2009 17:51:28 GMT</pubDate>
			<description><![CDATA[Hey all. 
 
This is the query I'm trying to run: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code...]]></description>
			<content:encoded><![CDATA[<div>Hey all.<br />
<br />
This is the query I'm trying to run:<br />
<br />
 <pre style="margin:20px; line-height:13px">select * from url_0, url_1, url_2 where url_0.url = 'http://google.com' or url_1.url&nbsp; = 'http://google.com' or url_2.url&nbsp; = 'http://google.com'</pre><br />
but it is returning things that are not <a rel="nofollow" class="t" href="http://google.com" target="_blank">http://google.com</a>. why? how can I get it to only return entries that are exactly <a rel="nofollow" class="t" href="http://google.com?" target="_blank">http://google.com?</a> I have 62 tables to search.. is this the most efficient way to search them?<br />
<br />
thanks!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>mrcb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226369.html</guid>
		</item>
		<item>
			<title>debugging mysql on windows</title>
			<link>http://www.daniweb.com/forums/thread226192.html</link>
			<pubDate>Sun, 27 Sep 2009 21:42:54 GMT</pubDate>
			<description><![CDATA[how do you do this? i cant find it anywhere 
 
basically my server "starts" but i cant connect to it... i tried mysqld --debug but it makes a .pdb file  and idk wat to do with it 
 
please help. ive got too much crap stressing me out..]]></description>
			<content:encoded><![CDATA[<div>how do you do this? i cant find it anywhere<br />
<br />
basically my server &quot;starts&quot; but i cant connect to it... i tried mysqld --debug but it makes a .pdb file  and idk wat to do with it<br />
<br />
please help. ive got too much crap stressing me out..</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>nschessnerd</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226192.html</guid>
		</item>
		<item>
			<title>Substract two field values to insert the result into a third value</title>
			<link>http://www.daniweb.com/forums/thread226155.html</link>
			<pubDate>Sun, 27 Sep 2009 18:04:01 GMT</pubDate>
			<description>Hi, 
 
I have this question, having two numeric values field1 and field2, i need field3 by default to be the difference between field1 and field , any idea??</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I have this question, having two numeric values field1 and field2, i need field3 by default to be the difference between field1 and field , any idea??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>josjorge</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226155.html</guid>
		</item>
		<item>
			<title>Retrieve data from another sql database automatically?</title>
			<link>http://www.daniweb.com/forums/thread226030.html</link>
			<pubDate>Sun, 27 Sep 2009 00:09:30 GMT</pubDate>
			<description><![CDATA[Hello everyone.  I was wondering if you could help me out.  I've setup a bridge between my gaming ladders script and my vbulletin.  Basically so the people registered on my forums do not have to sign up twice to use my websites features.  I can manually update the database by running the file.  But...]]></description>
			<content:encoded><![CDATA[<div>Hello everyone.  I was wondering if you could help me out.  I've setup a bridge between my gaming ladders script and my vbulletin.  Basically so the people registered on my forums do not have to sign up twice to use my websites features.  I can manually update the database by running the file.  But i was wondering if maybe there was a way in which i could make the database retrieve the info from my vbulletin database.   Every &quot;whatever&quot; time.  <br />
<br />
Please reply even if its not possible, just saying that.  I would rather know than just to be waiting on a lost cause.  Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Gearspro</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226030.html</guid>
		</item>
		<item>
			<title>MySQL Multiple Inner Joins</title>
			<link>http://www.daniweb.com/forums/thread226017.html</link>
			<pubDate>Sat, 26 Sep 2009 22:03:07 GMT</pubDate>
			<description><![CDATA[Hello everyone - first time poster here, long time reader. 
 
I have a minor issue that appear to simple to fix - but I've just hit a road block. I would like to create a three way inner join to display all the information I need in one SQL statement. 
 
Let me describe the issue. I have a 4 tables...]]></description>
			<content:encoded><![CDATA[<div>Hello everyone - first time poster here, long time reader.<br />
<br />
I have a minor issue that appear to simple to fix - but I've just hit a road block. I would like to create a three way inner join to display all the information I need in one SQL statement.<br />
<br />
Let me describe the issue. I have a 4 tables that contain normalized data (posts, votes, flag, and comments).<br />
<br />
Posts is the main table, and has the following fields (post_id, post_content, post_date)<br />
<br />
Votes is the table that contains all the votes for each post (vote_id, post_id, vote_up, vote_down, vote_tally)<br />
<br />
Vote_tally is just the (vote_up - vote_down), which is the sum of the vote. Kinda redundant, but I needed to display negative numbers.<br />
<br />
Flag is the table that contains the user who flag a post (flag_id, post_id, flag_date)<br />
<br />
Comments is the comments (comment_id, comment, comment_date, post_id)<br />
<br />
All 4 tables share the post_id field - however I would like to create a SQL statement that joins all the tables together and returns these fields:<br />
<br />
post_id, post_content, post_date, (the sum of vote_tally), (the count of  flag_id), (the count of the comments)<br />
<br />
Can this be obtained? Or perhaps you have a better way to had the schema for this type of project.<br />
<br />
I've included my SQL which gets me the first 4 desired results, but I'm stuck on getting the rest. Any help?<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT P.post_id, P.post_content, P.post_date, sum(T.vote_tally) as total_vote<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM votes as T<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT *<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM posts tp<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP BY tp.post_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) as P on P.post_id = T.post_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GROUP by P.post_id</pre><br />
Thanks in advance for your help!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>gavola</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226017.html</guid>
		</item>
		<item>
			<title>INSERT with if function help please</title>
			<link>http://www.daniweb.com/forums/thread226016.html</link>
			<pubDate>Sat, 26 Sep 2009 21:48:55 GMT</pubDate>
			<description><![CDATA[Hi, I'm having trouble with writing this statement as an INSERT function instead of UPDATE. 
 
$sql = " UPDATE tbl_category  
	SET " . ($cat_parent_id == 0 ? "sub_cat_name = '$name'," : "cat_name = '$name',") .  
	"cat_description = '$description', cat_image = $catImage 
	WHERE cat_id = $catId";...]]></description>
			<content:encoded><![CDATA[<div>Hi, I'm having trouble with writing this statement as an INSERT function instead of UPDATE.<br />
 <pre style="margin:20px; line-height:13px">$sql = &quot; UPDATE tbl_category <br />
&nbsp; &nbsp; &nbsp; &nbsp; SET &quot; . ($cat_parent_id == 0 ? &quot;sub_cat_name = '$name',&quot; : &quot;cat_name = '$name',&quot;) . <br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;cat_description = '$description', cat_image = $catImage<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHERE cat_id = $catId&quot;;</pre><br />
Sorry if this is a noob question I'm still quite new with MySQL.<br />
Thank you for any help.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>specialk423</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226016.html</guid>
		</item>
		<item>
			<title>mysql duplicate results</title>
			<link>http://www.daniweb.com/forums/thread225995.html</link>
			<pubDate>Sat, 26 Sep 2009 19:02:23 GMT</pubDate>
			<description><![CDATA[Okay, I'm a little confused - this code works perfectly fine in mysql; however, in php it keeps repeating the first person for about 15 rows. Can someone point me to what I'm missing here. 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Okay, I'm a little confused - this code works perfectly fine in mysql; however, in php it keeps repeating the first person for about 15 rows. Can someone point me to what I'm missing here.<br />
<br />
 <pre style="margin:20px; line-height:13px">$queryUsers = &quot;SELECT user_id, zipcode, gender, housing_status, active, username FROM users WHERE user_id != '&quot; . $_SESSION['user_id'] . &quot;'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND active = 1&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $dataUsers = mysqli_query($dbc, $queryUsers);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $rowUsers = mysqli_fetch_array($dataUsers);</pre><br />
 <pre style="margin:20px; line-height:13px">echo '&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while ($row = mysqli_fetch_array($dataUsers)) {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo '<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;td class=&quot;subtitle&quot; height=&quot;30px&quot; colspan=&quot;3&quot; align=&quot;left&quot; valign=&quot;middle&quot;&gt;' . $rowUsers['username'] . '&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;td width=&quot;21%&quot; rowspan=&quot;8&quot; align=&quot;center&quot; valign=&quot;middle&quot;&gt;&lt;img alt=&quot;profile picture&quot; name=&quot;profilepic&quot; width=&quot;100&quot; height=&quot;100&quot; id=&quot;profile picture&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr class=&quot;oddrow&quot;&gt;&lt;td width=&quot;21%&quot; align=&quot;left&quot; valign=&quot;middle&quot;&gt;Age:&lt;/td&gt;&lt;td width=&quot;58%&quot;&gt;' . $rowUsers['user_id'] . '&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr class=&quot;evenrow&quot;&gt;&lt;td align=&quot;left&quot; valign=&quot;middle&quot;&gt;Gender:&lt;/td&gt;&lt;td&gt;' . $rowUsers['gender'] . '&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;td align=&quot;left&quot; valign=&quot;middle&quot;&gt;Location:&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr class=&quot;evenrow&quot;&gt;&lt;td align=&quot;left&quot; valign=&quot;middle&quot;&gt;Looking for:&lt;/td&gt;&lt;td&gt;' . $rowUsers['housing_status'] . '&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;td align=&quot;left&quot; valign=&quot;middle&quot;&gt;Has children:&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr class=&quot;evenrow&quot;&gt;&lt;td align=&quot;left&quot; valign=&quot;middle&quot;&gt;Type of pets:&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr class=&quot;oddrow&quot;&gt;&lt;td align=&quot;left&quot; valign=&quot;middle&quot;&gt;Inside Smoker:&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr class=&quot;subtitle&quot;&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;/table&gt;';</pre><br />
also if i change mysqli_fetch_array to mysqli_num_rows, I get a million empty rows.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>armyguydave69</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225995.html</guid>
		</item>
		<item>
			<title>MySQL select to return most recent record</title>
			<link>http://www.daniweb.com/forums/thread225912.html</link>
			<pubDate>Sat, 26 Sep 2009 10:08:23 GMT</pubDate>
			<description><![CDATA[Hi! 
 
We have a database that stores vehicle's gps position, date, time, vehicle identification, lat, long, speed, etc., every minute. 
 
The following select pulls each vehicle position and info, but the problem is that returns the first record, and I need the last record (current position),...]]></description>
			<content:encoded><![CDATA[<div>Hi!<br />
<br />
We have a database that stores vehicle's gps position, date, time, vehicle identification, lat, long, speed, etc., every minute.<br />
<br />
The following select pulls each vehicle position and info, but the problem is that returns the first record, and I need the last record (current position), based on date (datagps.Fecha) and time (datagps.Hora). This is the select:<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT configgps.Fichagps, datacar.Ficha, groups.Nombre, datagps.Hora, datagps.Fecha, datagps.Velocidad, datagps.Status, datagps.Calleune, datagps.Calletowo, datagps.Temp, datagps.Longitud, datagps.Latitud, datagps.Evento, datagps.Direccion, datagps.Provincia FROM asigvehiculos INNER JOIN datacar ON (asigvehiculos.Iddatacar = datacar.Id) INNER JOIN configgps ON (datacar.Configgps = configgps.Id) INNER JOIN clientdata ON (asigvehiculos.Idgroup = clientdata.group) INNER JOIN groups ON (clientdata.group = groups.Id) INNER JOIN datagps ON (configgps.Fichagps = datagps.Fichagps) Group by Fichagps;</pre><br />
I need same result Im getting, but instead of the older record I need the most recent <br />
(LAST datagps.Fecha / datagps.Hora).<br />
<br />
<br />
How can I accomplish this?<br />
<br />
Thanks a lot!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>SenTnel</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225912.html</guid>
		</item>
		<item>
			<title>PostGreSQL: Optimizing a function with CASE syntax... Help please</title>
			<link>http://www.daniweb.com/forums/thread225742.html</link>
			<pubDate>Fri, 25 Sep 2009 15:18:37 GMT</pubDate>
			<description>Sorry for posting this in this forum, but there is no forum for PostGreSQL. 
 
I am currently attempting to optimize a function that uses up to 3 seperate SELECT queries, by using a CASE conditional in my query. 
 
Right now my function does an initial query, then if no results are found it does a...</description>
			<content:encoded><![CDATA[<div>Sorry for posting this in this forum, but there is no forum for PostGreSQL.<br />
<br />
I am currently attempting to optimize a function that uses up to 3 seperate SELECT queries, by using a CASE conditional in my query.<br />
<br />
Right now my function does an initial query, then if no results are found it does a second checking with different conditions, and if none is found on that it then does a third... This obviously needs some optimization.<br />
<br />
The query I have so far is this:<br />
 <pre style="margin:20px; line-height:13px">SELECT *,<br />
CASE <br />
WHEN product = 'Test' AND active = TRUE AND online = TRUE AND status = 'RUNNING' AND queued &lt; 6 THEN 1<br />
WHEN product = 'Test' AND active = TRUE AND online = TRUE AND status != 'DOWN' AND queued &lt; 6 THEN 2<br />
WHEN product = 'Test' AND active = TRUE AND online = TRUE AND status != 'DOWN' THEN 3<br />
ELSE 4<br />
END AS case_id<br />
FROM blah ORDER BY queued ASC;</pre><br />
Now what I'd <span style="font-weight:bold">LIKE</span> to do, is to take that case_id that it adds to each row from the case statement... and do something like this:<br />
 <pre style="margin:20px; line-height:13px">...<br />
END AS case_id<br />
FROM blah ORDER BY queued, case_id ASC LIMIT 1;</pre><br />
So that it will return 1 row, and that row will be the server with the optimum conditions from the CASE stuff... and will be the one with the lowest number queued...<br />
<br />
But I can't figure out how I use that case_id value to actually <span style="font-weight:bold">DO</span> something... or if I even can. I've spend an hour now looking online for a solution but I have hit a dead end....</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Rkeast</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225742.html</guid>
		</item>
		<item>
			<title>How does Explain syntax work with limit</title>
			<link>http://www.daniweb.com/forums/thread225707.html</link>
			<pubDate>Fri, 25 Sep 2009 13:11:54 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div> <strong>MySQL Syntax</strong> (<a...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px"> EXPLAIN SELECT post<br />
FROM `table`<br />
WHERE id = '123' <br />
LIMIT 1</pre><br />
There are 411 records in table for id=123, even though limit of 1 is forced in the syntax, explain syntax shows that there are 411 rows in the table for the above query. <br />
<br />
Does that mean mysql will search all 411 rows even though it only displays 1 row. <br />
<br />
BTW id is an index.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>flashyflashy</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225707.html</guid>
		</item>
		<item>
			<title>ORDER BY</title>
			<link>http://www.daniweb.com/forums/thread225594.html</link>
			<pubDate>Fri, 25 Sep 2009 04:49:03 GMT</pubDate>
			<description><![CDATA[Hello all, 
 
I have the following SQL statement. 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code...]]></description>
			<content:encoded><![CDATA[<div>Hello all,<br />
<br />
I have the following SQL statement.<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT a.airport_code AS AIRPORTCODE, a.airport_name AS AIRPORT, u.usr_id AS USERID, u.usr_fname AS FIRSTNAME, u.usr_lname AS LASTNAME, u.usr_email AS EMAIL,u.usr_airline AS AIRLINE, u.usr_airline_iatacode AS IATA, t.title AS TITLE<br />
FROM users u LEFT JOIN userairportservices uas ON uas.usr_id_users = u.usr_id LEFT JOIN airport a ON a.airport_id = uas.airport_id_airport LEFT JOIN title t ON t.title_id = u.usr_title<br />
WHERE a.airport_code= apcode</pre><br />
I want to sort by a.airport_name but every time I add ORDER BY a.airport_name ASC to the end of this query, it fails to load the page. Is there an issue with adding and ORDER BY to the end of this statement or should it go somewhere else in it?<br />
<br />
Thanks<br />
<br />
Dave</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>filch</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225594.html</guid>
		</item>
		<item>
			<title>get database size on MySQL version 4.1</title>
			<link>http://www.daniweb.com/forums/thread225558.html</link>
			<pubDate>Fri, 25 Sep 2009 02:13:03 GMT</pubDate>
			<description><![CDATA[Hi , 
      I have MYSQL version 4.1  
 
to get size 
SELECT table_schema "Data Base Name", 
sum( data_length + index_length ) / 1024 / 
1024 "Data Base Size in MB", 
sum( data_free )/ 1024 / 1024 "Free Space in MB" 
FROM information_schema.TABLES 
GROUP BY table_schema ;]]></description>
			<content:encoded><![CDATA[<div>Hi ,<br />
      I have MYSQL version 4.1 <br />
<br />
to get size<br />
 <pre style="margin:20px; line-height:13px">SELECT table_schema &quot;Data Base Name&quot;,<br />
sum( data_length + index_length ) / 1024 /<br />
1024 &quot;Data Base Size in MB&quot;,<br />
sum( data_free )/ 1024 / 1024 &quot;Free Space in MB&quot;<br />
FROM information_schema.TABLES<br />
GROUP BY table_schema ;</pre><br />
But there is no information_schema i there any way to get database size</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ankur02018</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225558.html</guid>
		</item>
		<item>
			<title>Someone knows about an ETL tool in foreign languages?</title>
			<link>http://www.daniweb.com/forums/thread225438.html</link>
			<pubDate>Thu, 24 Sep 2009 14:05:51 GMT</pubDate>
			<description>Hello to all,  
 
Being in a pretty much international company, I have come here to ask a few things about ETL tools and their different languages.  
 
We have offices in the US, in Europe (Italy, France) and in China. We think English is fine but our European team and Chinese team especially would...</description>
			<content:encoded><![CDATA[<div>Hello to all, <br />
<br />
Being in a pretty much international company, I have come here to ask a few things about ETL tools and their different languages. <br />
<br />
We have offices in the US, in Europe (Italy, France) and in China. We think English is fine but our European team and Chinese team especially would like to get software in their language. <br />
<br />
What we are trying to find is an ETL program to perform data integration, data synchronization and deduplication on our database in French, Italian and especially in Chinese. <br />
<br />
Thanks for your help.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>lgdabler</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225438.html</guid>
		</item>
		<item>
			<title>How can I Optimizing this query</title>
			<link>http://www.daniweb.com/forums/thread225116.html</link>
			<pubDate>Wed, 23 Sep 2009 09:31:18 GMT</pubDate>
			<description><![CDATA[I have a table with 15,00,000 rows which has a column PERMLINK which is used in 'where' clause of my select queries. To speed up query I have used it as INDEX. What size of index is optimum for names.?  
 
and I have a new idea but don't know how mysql really works. 
 
I'm thinking of adding 3...]]></description>
			<content:encoded><![CDATA[<div>I have a table with 15,00,000 rows which has a column PERMLINK which is used in 'where' clause of my select queries. To speed up query I have used it as INDEX. What size of index is optimum for names.? <br />
<br />
and I have a new idea but don't know how mysql really works.<br />
<br />
I'm thinking of adding 3 columns a1,a2,a3 which are to contain first 3 characters of permlink and use new index (a1,a2,a3).<br />
<br />
Consider the table below<br />
<br />
ID permlink<br />
1  aaa<br />
2  aab<br />
3  aac<br />
4  aba<br />
5  abb<br />
6  abc<br />
7  aca<br />
8  acb<br />
9  acc<br />
10  baa<br />
11  bab<br />
12  bac<br />
13  bba<br />
14  bbb<br />
15  bbc<br />
16  bca<br />
17  bcb<br />
18  bcc<br />
19  caa<br />
20  cab<br />
21  cac<br />
22  cba<br />
23  cbb<br />
24  cbc<br />
25  cca<br />
26  ccb<br />
27  ccc<br />
<br />
If I set permlink as index and of size 1, if I search for value bbb, mysql will start searching for character b, then b, then b thus searches 9 rows+2 rows=11 rows.<br />
<br />
ID prm a1 a2 a3<br />
1  aaa   a   a   a<br />
2  aab   a  a  b<br />
3  aac    a  a  c<br />
4  aba    a  b  a<br />
5  abb    a  b  b<br />
6  abc     a  b  c<br />
7  aca     a  c  a<br />
8  acb     a  c  b<br />
9  acc      a  c  c<br />
10  baa     b  a  a<br />
11  bab     b  a  b<br />
12  bac      b  a  c<br />
13  bba     b  b  a<br />
14  bbb     b  b  b<br />
15  bbc      b  b  c<br />
16  bca      <br />
17  bcb      <br />
18  bcc      <br />
19  caa      <br />
20  cab      <br />
21  cac      <br />
22  cba      <br />
23  cbb      <br />
24  cbc      <br />
25  cca      <br />
26  ccb      c  c  b<br />
27  ccc      c  c  c<br />
<br />
<br />
If I use index of (a1,a2,a3) pointer directly jumps to row 10 and then goes to row 13 and 14. thus just three rows to check.<br />
<br />
I'm not sure if it works this way, I'm relatively new to mysql structure and operations. Put some light on.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>flashyflashy</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225116.html</guid>
		</item>
		<item>
			<title>two applications one database</title>
			<link>http://www.daniweb.com/forums/thread225047.html</link>
			<pubDate>Wed, 23 Sep 2009 07:29:20 GMT</pubDate>
			<description>Hi everyone! 
Im actually doing my final year project which is an ecommerce application for a specific business. there is another student who is working on the MIS part of this business. we have to use the same database. 
I am using PHP and MySQL and he is using ASP.net and MYSQL. 
My question is:...</description>
			<content:encoded><![CDATA[<div>Hi everyone!<br />
Im actually doing my final year project which is an ecommerce application for a specific business. there is another student who is working on the MIS part of this business. we have to use the same database.<br />
I am using PHP and MySQL and he is using ASP.net and MYSQL.<br />
My question is:<br />
since we have two different applications and the same database, how do I link these two applications?<br />
for instance, in my ecommerce application, when a customer makes an order, the application needs to alert MIS part. we have to submit two different app but using the same database..<br />
can anyone give me an idea or links on how to do it?<br />
<br />
Thanks,<br />
Chupi</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>chupinette</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread225047.html</guid>
		</item>
		<item>
			<title>Columns addition</title>
			<link>http://www.daniweb.com/forums/thread224958.html</link>
			<pubDate>Wed, 23 Sep 2009 00:39:55 GMT</pubDate>
			<description><![CDATA[I have two columns with stirngs ( "String1" and "String2) . How to make string inputed in text field ($search) to be comparative with sum of the both strings ("String1String2") 
 Something like as: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I have two columns with stirngs ( &quot;String1&quot; and &quot;String2) . How to make string inputed in text field ($search) to be comparative with sum of the both strings (&quot;String1String2&quot;)<br />
 Something like as:<br />
 <pre style="margin:20px; line-height:13px">&quot; SELECT id, string1, string2,&nbsp; FROM table WHERE string1+string2 LIKE '%$search%' &quot;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ultras</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread224958.html</guid>
		</item>
		<item>
			<title>Mysql table name with spaces</title>
			<link>http://www.daniweb.com/forums/thread224375.html</link>
			<pubDate>Sun, 20 Sep 2009 12:48:10 GMT</pubDate>
			<description><![CDATA[Hello, 
 
I am working on a website using a MySQL database, certain pages contain tables from the database. Also there is an admin where someone can edit (replace) values in the table. Everything is working, but I have one problem. A row in the table is named 'Best Moment' which contains a space,...]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I am working on a website using a MySQL database, certain pages contain tables from the database. Also there is an admin where someone can edit (replace) values in the table. Everything is working, but I have one problem. A row in the table is named 'Best Moment' which contains a space, and there for the code below crashes. So I was wondering if there is anyway to bypass this problem, without having to remove the space (since the table will be build on the website and thus requires the space)<br />
<br />
 <pre style="margin:20px; line-height:13px"> if($momentnew) {<br />
&nbsp; $sql = &quot;UPDATE Lieneke SET Best moment = REPLACE(Best moment,'$moment','$momentnew')&quot;;<br />
&nbsp; $query = mysql_query($sql) or die(mysql_error()); }</pre><br />
Thanks in advance!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Gerald19</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread224375.html</guid>
		</item>
		<item>
			<title>procedure to insert into table in mysql</title>
			<link>http://www.daniweb.com/forums/thread223995.html</link>
			<pubDate>Fri, 18 Sep 2009 11:03:47 GMT</pubDate>
			<description><![CDATA[Hi  
   i have table with following structure 
 
mysql> show create table proc\G; 
*************************** 1. row *********** 
       Table: proc 
Create Table: CREATE TABLE `proc` ( 
  `a` varchar(16) default NULL, 
  `b` varchar(16) default NULL 
) ENGINE=InnoDB DEFAULT CHARSET=latin1]]></description>
			<content:encoded><![CDATA[<div>Hi <br />
   i have table with following structure<br />
<br />
mysql&gt; show create table proc\G;<br />
*************************** 1. row ***********<br />
       Table: proc<br />
 <pre style="margin:20px; line-height:13px">Create Table: CREATE TABLE `proc` (<br />
&nbsp; `a` varchar(16) default NULL,<br />
&nbsp; `b` varchar(16) default NULL<br />
) ENGINE=InnoDB DEFAULT CHARSET=latin1</pre><br />
i want to insert values into table proc through procedure<br />
<br />
what should be the syntax of procedure<br />
<br />
Thanks in advance as I am new for procedure</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ankur02018</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223995.html</guid>
		</item>
		<item>
			<title><![CDATA[Limit MySQL Database's Rows]]></title>
			<link>http://www.daniweb.com/forums/thread223874.html</link>
			<pubDate>Thu, 17 Sep 2009 20:46:30 GMT</pubDate>
			<description><![CDATA[Hello, 
 
I'd like to create a basic html form where a user can submit their email address for a cooking class.  There would only be room for 20 people so I'd like it to accept the first 20 user and display a "check back next month" to anyone past 20.  I'm not having trouble with the form, or...]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I'd like to create a basic html form where a user can submit their email address for a cooking class.  There would only be room for 20 people so I'd like it to accept the first 20 user and display a &quot;check back next month&quot; to anyone past 20.  I'm not having trouble with the form, or entering in to the database, just limiting it to the 20 entries.  Can anyone help?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>MArun25039</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223874.html</guid>
		</item>
		<item>
			<title>Pricing Update Query</title>
			<link>http://www.daniweb.com/forums/thread223828.html</link>
			<pubDate>Thu, 17 Sep 2009 17:04:27 GMT</pubDate>
			<description><![CDATA[Hi Guys  
 
I have an e-commerce website. Two of the columns are for the pricing of products. What I would like to do is update the price ('prodprice') directly from the cost price ('prodcostprice').  
 
It would be nice to set a certain markup according to price range. eg. $0-$1000 = 20%...]]></description>
			<content:encoded><![CDATA[<div>Hi Guys <br />
<br />
I have an e-commerce website. Two of the columns are for the pricing of products. What I would like to do is update the price ('prodprice') directly from the cost price ('prodcostprice'). <br />
<br />
It would be nice to set a certain markup according to price range. eg. $0-$1000 = 20% $1001-$2000 = 18% etc. and have the ability to put in a cost price, and the system automatically work out the price depending on price range.<br />
<br />
In a previous dicussion I have being given: <br />
<br />
<br />
 <pre style="margin:20px; line-height:13px">UPDATE `isc_products` WHERE `prodcostprice` &gt;= 0 AND WHERE `prodcostprice` &lt;= 1000 SET `prodprice` = (`prodcostprice` * 1.20);<br />
<br />
UPDATE `isc_products` WHERE `prodcostprice` &gt;= 1001 AND WHERE `prodcostprice` &lt;= 2000 SET `prodprice` = (`prodcostprice` * 1.18);</pre><br />
It seems to generate an error.<br />
Does anyone have a solution or update?<br />
If I could get this to work,  what could be easier.. just copy in your new cost prices and update you retail prices automatically. Super<br />
<br />
Thanks <br />
Marc</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>mls880</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223828.html</guid>
		</item>
		<item>
			<title><![CDATA[stmt from  db_connect tutorial isn't working]]></title>
			<link>http://www.daniweb.com/forums/thread223601.html</link>
			<pubDate>Wed, 16 Sep 2009 22:45:07 GMT</pubDate>
			<description>Topic 
The topic of this question is: db_Connect does not connect. 
Hello and Thank you in advance for any assistance. 
 
 * 
System info:netbeans project,database attached or provided at: 
http://cid-b5cb457363230793.skydrive.live.com/self.aspx/.Public/school.zip 
* 
 
 *</description>
			<content:encoded><![CDATA[<div>Topic<br />
The topic of this question is: db_Connect does not connect.<br />
Hello and Thank you in advance for any assistance.<br />
<br />
 <span style="font-weight:bold"><br />
System info:netbeans project,database attached or provided at:<br />
<a rel="nofollow" class="t" href="http://cid-b5cb457363230793.skydrive.live.com/self.aspx/.Public/school.zip" target="_blank">http://cid-b5cb457363230793.skydrive...lic/school.zip</a><br />
</span><br />
<br />
 <span style="font-weight:bold"><br />
The purpose of this post is: Try to get a sql statement to work<br />
</span><br />
<br />
 <span style="font-weight:bold"><br />
The functionality of this code is:  <br />
 <pre style="margin:20px; line-height:13px">·&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;SELECT u.uid, firstName, lastName, address1, address2, city, postCode, email, phone, ug.groupName as userGroup &quot;<br />
·&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +&quot;FROM user u, usergroup ug WHERE uid='&quot;+userName+&quot;' AND password='&quot;+password+&quot;' AND groupName IN&quot;<br />
·&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +&quot; (SELECT groupName FROM usergroup WHERE groupid =(SELECT groupid FROM usergroup_mapping WHERE uid=u.uid))&quot;;</pre></span><br />
<br />
 <span style="font-weight:bold"><br />
My question concerning this code is:<br />
What is wrong with the sql statement provided in tutorial. Or a description of its function .<br />
</span><br />
 <br />
<span style="font-weight:bold"><br />
The errors related to this code are:<br />
 <pre style="margin:20px; line-height:13px">Initializing Sun's JavaServer Faces implementation (1.2_04-b22-p05) for context '/school'<br />
Initialize &lt;------------&gt;jdbcDriver&lt;------------&gt;<br />
12345678&lt;------------&gt;12345678<br />
SQLException:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user u,usergroup ug WHERE uid='12345678' AND password='12345678' AND groupName I' at line 1<br />
Error on DB return<br />
java.lang.NullPointerException<br />
&nbsp; &nbsp; &nbsp; &nbsp; at servlets.LoginServlet.doPost(LoginServlet.java:82)</pre></span><br />
<br />
<span style="font-weight:bold"><br />
Note: <br />
I was told to add table qualifiers to the where clause.<br />
What does this mean.  Maybe if someone could break down what the statement is saying (laymens terms) I could fix it.<br />
</span><br />
<br />
<span style="font-style:italic"><br />
Thanks again.<br />
-ceyesuma<br />
</span></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ceyesuma</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223601.html</guid>
		</item>
		<item>
			<title>Encrypt and decrypt an existing column</title>
			<link>http://www.daniweb.com/forums/thread223398.html</link>
			<pubDate>Wed, 16 Sep 2009 05:41:05 GMT</pubDate>
			<description>How to encrypt and decrypt an existing column ?</description>
			<content:encoded><![CDATA[<div>How to encrypt and decrypt an existing column ?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>carobee</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223398.html</guid>
		</item>
		<item>
			<title>Two table troubles</title>
			<link>http://www.daniweb.com/forums/thread223282.html</link>
			<pubDate>Tue, 15 Sep 2009 18:50:59 GMT</pubDate>
			<description>Poor database design I suppose, but never the less I need to retrieve 
FIELD -this-, -that-, -the other- from TABLE foo and 
FIELD -pphone- from TABLE -bar-. 
For example a record set of McDonalds restaurants in different cities. 
Where a particular restaurants phone# is not known, I pull the...</description>
			<content:encoded><![CDATA[<div>Poor database design I suppose, but never the less I need to retrieve<br />
FIELD -this-, -that-, -the other- from TABLE foo and<br />
FIELD -pphone- from TABLE -bar-.<br />
For example a record set of McDonalds restaurants in different cities.<br />
Where a particular restaurants phone# is not known, I pull the corporate phone #(pphone) from a primary table where they both have the same ID #<br />
I can't get the query syntax right.<br />
I have a WHILE statement listing out the Variables into a table, and it doesn't seem to pull the primary phone number no matter what I try. I was taught Access, but can't get a relationship formed with Mysql, otherwise I would have designed it right to begin with.<br />
Any ideas?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>digitaldancer</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223282.html</guid>
		</item>
	</channel>
</rss>
