Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
94% Quality Score
Upvotes Received
20
Posts with Upvotes
20
Upvoting Members
13
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
4 Commented Posts
~64.6K People Reached
Favorite Forums
Favorite Tags

228 Posted Topics

Member Avatar for veledrom

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.

Member Avatar for thebsv
0
442
Member Avatar for feoperro

Use [URL="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html"]mysqldump[/URL] on command prompt.

Member Avatar for sergeik.rndwork
0
573
Member Avatar for eoliva

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.

Member Avatar for DenaEden
0
4K
Member Avatar for jeyjey88

Are you looking for this? [CODE]SELECT * FROM test1, test2 WHERE test1.data!=test2.data[/CODE]

Member Avatar for jeyjey88
0
103
Member Avatar for newbie14

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 …

Member Avatar for No woman No war
0
381
Member Avatar for Jenniferlinn

[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]

Member Avatar for mrcullers
0
337
Member Avatar for architact
Member Avatar for bhuvan83

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 …

Member Avatar for Dr AKM
0
349
Member Avatar for peter_carlos

It seems to be a problem with your query. But can't say anything for sure unless we see your query/code.

Member Avatar for peter_carlos
0
209
Member Avatar for blotind

You need to encode localhost and root with double quotes as below [CODE=php]$con = mysql_connect("localhost","root");[/CODE]

Member Avatar for mwasif
0
123
Member Avatar for turt2live

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 …

Member Avatar for mwasif
0
76
Member Avatar for leakbali

Post the output of [CODE=mysql]EXPLAIN SELECT id, title, ... ,postdate FROM table_name WHERE id = 1[/CODE]

Member Avatar for mwasif
0
172
Member Avatar for sunny124

You need to use [URL="http://dev.mysql.com/doc/refman/5.1/en/group-by-modifiers.html"]GROUP BY[/URL].

Member Avatar for sunny124
0
212
Member Avatar for Pprog

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]

Member Avatar for mwasif
0
136
Member Avatar for Sahilsahni
Member Avatar for smantscheff
0
153
Member Avatar for lifeworks

What about using the following query? [CODE=mysql]SELECT log_end - log_start AS timetotal FROM time_logs WHERE log_client = 'ECDC'[/CODE]

Member Avatar for smantscheff
0
146
Member Avatar for Mr.Ram

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.

Member Avatar for mwasif
0
802
Member Avatar for joshuasanders

Use [URL="http://dev.mysql.com/doc/refman/5.1/en/group-by-modifiers.html"]GROUP BY[/URL].

Member Avatar for joshuasanders
0
208
Member Avatar for MDanz

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]?

Member Avatar for urtrivedi
0
2K
Member Avatar for niche1

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 . …

Member Avatar for niche1
0
81
Member Avatar for heshanm

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.

Member Avatar for heshanm
0
126
Member Avatar for silvercats

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 …

Member Avatar for silvercats
0
83
Member Avatar for jaycastr

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]

Member Avatar for mwasif
0
152
Member Avatar for dyingatmidnight

dyingatmidnight, This little [URL="http://www.mwasif.com/2007/4/save-image-in-mysql-with-php/"]how to[/URL] might be useful for you.

Member Avatar for mwasif
0
118
Member Avatar for Frankey
Member Avatar for ctkam

[QUOTE=ctkam;1473843]i've select the correct time zone and still the same ..[/QUOTE] How and where you do that?

Member Avatar for htmlCoder101
0
197
Member Avatar for monta2020

You need to follow some tutorials to get this done. You can find several tutorials on net.

Member Avatar for monta2020
0
88
Member Avatar for ryan1987

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]

Member Avatar for tomato.pgn
0
127
Member Avatar for baziili

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 (')

Member Avatar for mwasif
0
303
Member Avatar for mwasif

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 …

Member Avatar for mwasif
0
92
Member Avatar for emulman

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?

Member Avatar for emulman
0
202
Member Avatar for coervivekmca
Member Avatar for mwasif
0
98
Member Avatar for ruchit

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]

Member Avatar for pritaeas
0
76
Member Avatar for rajeesh_rsn

Are you looking for this? [CODE=mysql]SELECT name FROM table GROUP BY name HAVING COUNT(*)>1[/CODE]

Member Avatar for mwasif
0
71
Member Avatar for rajeesh_rsn

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]

Member Avatar for mwasif
0
118
Member Avatar for Shanti C

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.

Member Avatar for Shanti C
0
234
Member Avatar for pritesh2010

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]

Member Avatar for mwasif
0
480
Member Avatar for rajeesh_rsn

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]

Member Avatar for smantscheff
0
98
Member Avatar for printman55

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]

Member Avatar for smantscheff
0
281
Member Avatar for thesyntax

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. …

Member Avatar for spankyxeon
0
134
Member Avatar for jrosh

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]

Member Avatar for dakaptain
0
145
Member Avatar for Dani

[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...

Member Avatar for devpk
1
1K
Member Avatar for noniterum03

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].

Member Avatar for griswolf
0
201
Member Avatar for HelenLF

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.

Member Avatar for HelenLF
0
111
Member Avatar for himmat.m4

You can use [URL="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html"]mysqldump[/URL].

Member Avatar for smantscheff
0
128
Member Avatar for jazzyb

[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

Member Avatar for drjohn
0
11K
Member Avatar for Waffles007

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].

Member Avatar for mwasif
0
60
Member Avatar for GuruMS

How did you create the database? Which user you are using in phpMyAdmin to connect to database?

Member Avatar for mwasif
0
112
Member Avatar for arunss
Member Avatar for shinsengumi

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].

Member Avatar for mwasif
0
103

The End.