- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 20
- Posts with Upvotes
- 20
- Upvoting Members
- 13
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
228 Posted Topics
Re: Import .sql to MySQL and then export it via any [URL="http://www.mwasif.com/2008/6/mysql-gui-tools/"]GUI tool[/URL] or export as CSV with a simple [URL="http://www.mwasif.com/2007/5/download-data-csv-using-php/"]PHP script[/URL]. I don't know any tool which can directly convert .sql to .csv. | |
![]() | Re: Use [URL="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html"]mysqldump[/URL] on command prompt. |
Re: The column name in your code is desc but in error message it is description. Are your providing the correct column name? Also post here the resultant query by printing $sql. | |
Re: Are you looking for this? [CODE]SELECT * FROM test1, test2 WHERE test1.data!=test2.data[/CODE] | |
Re: Replication and data portioning both can help. But you need to modify your application to work with replication. Replication is useful for read intensive sites. But you can also use circular replication to distribute write load. You can use [URL="http://www.ultramonkey.org/3/ldirectord.html"]Ldirectord[/URL] to load balance your users across multiple database and web … | |
Re: [QUOTE=Monalisaparker;784798]The default storage engine is MyISAM.[/QUOTE] You can set the default storage of your own choice by changing the following parameter in my.ini/my.cnf [CODE]default-storage-engine=MyISAM[/CODE] | |
Re: Are you using link identifier with mysql_query()? | |
Re: Did you try to identify why there are so many connections are being created? Are you closing the connections properly after performing queries? What is the value of max_connections? Workaround has already been suggested above that to increase max_connections value in my.cnf/my.ini. MySQL manual has dedicated a page specifically for … | |
Re: It seems to be a problem with your query. But can't say anything for sure unless we see your query/code. | |
Re: You need to encode localhost and root with double quotes as below [CODE=php]$con = mysql_connect("localhost","root");[/CODE] | |
Re: You can not use DISTINCT for only one column while having multiple columns in SELECT. The alternative is GROUP BY i.e. [CODE=mysql]SELECT * FROM players WHERE NOT EXISTS (SELECT * FROM raidgroups WHERE players.name=raidgroups.player) AND itemlevel>=346 AND level=85 AND NOT EXISTS (SELECT * FROM verification WHERE players.name=verification.username AND verification.organizer=1) AND … | |
Re: Post the output of [CODE=mysql]EXPLAIN SELECT id, title, ... ,postdate FROM table_name WHERE id = 1[/CODE] | |
Re: You need to use [URL="http://dev.mysql.com/doc/refman/5.1/en/group-by-modifiers.html"]GROUP BY[/URL]. | |
Re: It will be something like (I'm assuming your table structure) [CODE=mysql]SELECT even.signature, COUNT(*) FROM even INNER JOIN even.sid=iphead.sid GROUP BY even.sid[/CODE] | |
Re: How did you shift DB (export and import DB) from one host to another? | |
Re: What about using the following query? [CODE=mysql]SELECT log_end - log_start AS timetotal FROM time_logs WHERE log_client = 'ECDC'[/CODE] | |
Re: Read this [URL="http://www.databasejournal.com/features/mysql/article.php/1382791/Optimizing-MySQL-Queries-and-Indexes.htm"]article[/URL] thoroughly. It will be helpful. | |
Re: Use [URL="http://dev.mysql.com/doc/refman/5.1/en/group-by-modifiers.html"]GROUP BY[/URL]. | |
Re: If magic quotes are on then you don't need to use mysql_real_escape_string() to escape apostrophe. What actually is saved in the database? Is it [I]q test"yes[/I] or [I]q test\"yes[/I]? | |
Re: Use MySQL's [URL="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat"]CONCAT()[/URL] function To add data at the end of existing [CODE=php]mysql_query("UPDATE stk SET some_field = CONCAT(some_field, '????????????') WHERE id = " . $upc_key . "") or die(mysql_error());[/CODE] To add data at the start of existing [CODE=php]mysql_query("UPDATE stk SET some_field = CONCAT('????????????',some_field) WHERE id = " . $upc_key . … | |
Re: Use the following [CODE=php]$query = "UPDATE transaction SET approved_status='1' WHERE account_number='$account_number' AND tran_id='".$_POST['tran_id']."'";[/CODE] You should consider the use of [URL="http://php.net/mysql_real_escape_string"]mysql_real_escape_string()[/URL] to avoid SQL injection problems. | |
Re: You were missing an ending parenthesis. [CODE=mysql]CREATE TABLE `employee` ( `employee_no` CHAR( 4 ) NOT NULL , `emp_name` TEXT, `employee_sal` INT NOT NULL , PRIMARY KEY ( employee_no ) )[/CODE] Look at MySQL Manual for [URL="http://dev.mysql.com/doc/refman/5.1/en/string-types.html"]string data types[/URL]. Post back here if you have any question after reading the provided … | |
Re: Try the following query, it is not test [CODE=mysql]SELECT COUNT(b.hostname), AVG(cpu_avg), AVG(mem_avg), c.department_name FROM b_device b INNER JOIN a_device a ON b.hostname = a.hostname INNER JOIN c_app c ON c.app_name = a.app_name GROUP BY c.department_name[/CODE] | |
Re: What is the collation of this column in table definition? | |
Re: [QUOTE=ctkam;1473843]i've select the correct time zone and still the same ..[/QUOTE] How and where you do that? | |
Re: You need to follow some tutorials to get this done. You can find several tutorials on net. | |
Re: Try the following (added alias tmp for the derived table) [CODE=mysql]select team ,sum(points) from ( select hometeam team, sum(homepoints) points from fixtures group by hometeam union select awayteam team, sum(awaypoints) points from fixtures group by awayteam ) tmp group by team[/CODE] | |
Re: You should use back ticks (`) instead of single quotes around table names e.g. [CODE]INSERT INTO `table_ro2` VALUES ('text nr. 1', 'text nr. 2', 'text nr. 3', 'text nr. 4');[/CODE] Note the difference to back tick (`) and single quote (') | |
Hello, Is there problem in displaying post submitted time? Take a look at this thread ([URL="http://www.daniweb.com/forums/thread346757.html"]strange error in MySQL query[/URL]) in [URL="http://www.daniweb.com/forums/forum126.html"]MySQL Forum[/URL], it is displaying one hour but when you look at the replies it shows posted time 1 day, 6 hrs etc. Is there any problem going on … | |
Re: Use [URL="http://php.net/mysql_error"]mysql_error()[/URL] to display an error with PHP. Or run this query in phpMyAdmin or MySQL command. Post the error message here for more help. Does this table exist on your VPS? | |
Re: You are missing . (period) to concatenate strings (note the . after $_POST['uname']) [CODE=php]$insert_query='insert into registry(username,password,firstname,lastname,eid) values ("'.$_POST['uname'].'","'.$_POST['pass'].'","'.$_POST['fname'].'","'.$_POST['lname'].'","'.$_POST['email']'")';[/CODE] | |
Re: Are you looking for this? [CODE=mysql]SELECT name FROM table GROUP BY name HAVING COUNT(*)>1[/CODE] | |
Re: You don't need to use 'A%' and 'a%' in WHERE. MySQL is case insensitive when comparing CARCHAR, CHAR and TEXT unless specified. So this query should be sufficient. [CODE]SELECT name FROM table WHERE name LIKE 'A%';[/CODE] | |
Re: MySQL replication is the perfect solution if you have own the server or can make changes to mysql configuration file. Because setting up replication requires changes to my.cnf. | |
Re: Try this innodb recovery tool [url]http://code.google.com/p/innodb-tools/[/url] [url]http://www.chriscalender.com/?p=49[/url] [url]https://launchpad.net/percona-innodb-recovery-tool[/url] | |
Re: You need to use [URL="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_find-in-set"]FIND_IN_SET()[/URL] in this way [CODE]select from table where FIND_IN_SET('12', cast);[/CODE] | |
Re: Use MySQL's [URL="http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format"]DATE_FORMAT()[/URL] function. The query will be [CODE]SELECT DATE_FORMAT(news_date, '%M %e, %Y') FROM table;[/CODE] | |
Re: You need to have single quotes around login value like [CODE=php]$sql = "UPDATE USERS SET password='changed password' WHERE login = 'steve'";[/CODE] In such cases, always use mysql_error() after mysql_query to debug issues like [CODE=php]$sql = "UPDATE USERS SET password='changed password' WHERE login = 'steve'"; mysql_query($sql) or die ("Error in query. … | |
Re: If you remember the MySQL root password, then go to phpMyAdmin directory under directory like wamp\apps\phpmyadmin3.1.3.1 and open config.inc.php. And provide the correct password in [CODE=php]$cfg['Servers'][$i]['password'] = 'password_here';[/CODE] | |
Re: [QUOTE]One last point to note here is that InnoBase has been acquired by Oracle already. So, future bug fixes and improvements may not be free.[/QUOTE] I hope they are not going to do so. Read the Oracle [URL="http://www.oracle.com/innodb/index.html"]statement[/URL]. BTW, SUN has acquired MySQL... | |
Re: Why don't you create the table with 2 columns e.g. activity and activity_date. In activity column just save the data you wanted to store and populate activity_date with the date when the activity performed. If you want to save the current date then use MySQL's function [URL="http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_curdate"]CURDATE()[/URL]. | |
Re: Use [URL="http://www.php.net/manual/en/function.str-replace.php"]str_replace()[/URL] to replace <br> with \n (newline) before displaying in text area. | |
Re: You can use [URL="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html"]mysqldump[/URL]. | |
Re: [QUOTE=d5e5;1430530]At [URL="http://www.mysqlemergency.com/question/show/id/12"]another site[/URL] someone wrote the following: "MySql only supports the LEFT OUTER JOIN syntax so as to support ODBC compliance."[/QUOTE] Right | |
Re: You can SELECT a row from one table and INSERT to another table/database if it resides on the same server using [URL="http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-select-into-table.html"]INSERT INTO ... SELECT[/URL]. | |
Re: How did you create the database? Which user you are using in phpMyAdmin to connect to database? | |
Re: There is difference between sql lite and MySQL. You can download MySQL from [URL="http://dev.mysql.com/downloads/mysql/"]here[/URL]. Here is the tutorial you are looking for at [URL="http://dev.mysql.com/tech-resources/articles/mysql-c-api.html"]Mysql.com[/URL]. |
The End.