Posts
 
Reputation
Joined
Last Seen
Ranked #154
Strength to Increase Rep
+12
Strength to Decrease Rep
-3
93% Quality Score
Upvotes Received
155
Posts with Upvotes
145
Upvoting Members
78
Downvotes Received
9
Posts with Downvotes
8
Downvoting Members
9
53 Commented Posts
10 Endorsements
Ranked #180
Ranked #80
~310.65K People Reached
Favorite Tags
mysql x 1K
php x 319
sql x 73
seo x 24

802 Posted Topics

Member Avatar for guyinpv

In my experience the fastest method would be: 1) Copy only the structure of the source to the target. 2) Dump the table contents to single CVS (TXT) files. 3) Load the text files with "Load data..."

Member Avatar for Saudi_2
0
4K
Member Avatar for vijiglad
Member Avatar for VernonDozier

In my windows system it's in e:\Program Files\MySQL\MySQL Server 5.1\share\mysql_fix_privilege_tables.sql and on my linux system in /usr/bin/mysql_fix_privilege_tables

Member Avatar for Nishant_3
0
3K
Member Avatar for bkimbriel

You have one form in your HTML and then some input elements outside of the form. They are never sent. For me, the easiest way to transform POST data in a mail text is a post array walk: [ICODE]foreach( $_POST as $key => $value ) $message .= "$key: $value\n"; mail($to, …

Member Avatar for Simon_4
0
6K
Member Avatar for grant.baker

Maybe you could use an arbitrary sorting using the IDs. If the order of posts with the same date does not matter, increase the limit parameter and keep the date until there are no more posts for this date. SELECT * FROM $logbook WHERE Date>='$Date' AND ID!='$ID' ORDER BY Date, …

Member Avatar for raybigto
0
3K
Member Avatar for dipakatcvrca

Add "FIRST" after the column name. [url]http://dev.mysql.com/doc/refman/5.1/de/alter-table.html[/url] [CODE]ALTER TABLE mytable ADD COLUMN xyz(text) FIRST; [/CODE]

Member Avatar for faucon
0
5K
Member Avatar for riahc3

You *can* export the system database (users, rights etc.) with `mysqldump mysql` and import it again, but this may lead to all sort of trouble.

Member Avatar for Manish02
0
236
Member Avatar for puvi

$pdf->Output() writes a PDF file. This cannot contain JavaScript. The browser will not understand your code. For passing variables between scripts use sessions and the $_SESSION array.

Member Avatar for Laura_5
0
4K
Member Avatar for feoperro
Member Avatar for sergeik.rndwork
0
575
Member Avatar for kirtan_thakkar

[CODE]$f = fopen( 'filename.txt', 'a' ); fwrite( $f, 'something' ); fclose( $f ); [/CODE]

Member Avatar for msnadz
0
3K
Member Avatar for Joemeister

along those lines [CODE]$query = mysql( $sql ); while ($array = mysql_fetch_array($query)) echo $array['user_name'] . '<br/>'; [/CODE]

Member Avatar for Webville312
0
1K
Member Avatar for jrotunda85

Did you have any difficulties with your method? If it's not broken, don't fix it. What is "this variable"? What are you doing now in your script? Are you working with sessions or with redirects or with cookies?

Member Avatar for bakhtn
0
2K
Member Avatar for dancks

If you have an account on the server, you can use cronjobs which regularly trigger actions. I recommend that you set up a PHP script which does whatever bookkeeping you need, and that you call it either directly with php <myscript.php> or via the apache server using wget http://<myserver>/<myscript.php> If …

Member Avatar for smantscheff
0
221
Member Avatar for bsewell

You need brackets around your OR clause and no apostrophes around column names: SELECT * FROM stats WHERE (ip LIKE '%192.168.0.1%' OR ip LIKE '%192.168.1.2%') AND topic!='' AND cat!=''

Member Avatar for smantscheff
0
108
Member Avatar for jackbauer24-2

If you want to learn MySQL, forget PHP. Look for a MySQL or plain SQL tutorial which does not use PHP and learn the SQL basics using the command line tool `mysql`.

Member Avatar for jackbauer24-2
0
504
Member Avatar for newprimitive

Show the output of your SHOW CREATE TABLE statement and the piece of code where you try to insert something.

Member Avatar for ffghjk
0
245
Member Avatar for grantcharov
Member Avatar for grantcharov
0
229
Member Avatar for azegurb
Member Avatar for azegurb
0
135
Member Avatar for showman13

select distinct a.mem_id, (select count(b.ref_id) from ref_track b where b.mem_id=a.mem_id) as cnt from ref_track a order by mem_id The downside is that the aggregate function is called for each row of ref_track.

Member Avatar for showman13
0
145
Member Avatar for scottlpool2003

You have to join the two tables: select * from publication p, publication_issue i where i.publication_id = p.id and p.tags like '%news' order by something limit x,y

Member Avatar for smantscheff
0
481
Member Avatar for Riu 2009

The varchar field should have at least 2.000 characters. URLs can be that long. See http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url

Member Avatar for Riu 2009
0
234
Member Avatar for woodenduck

2) is not really a MySQL question. You have to study the login and authorization mechanisms of phpBB and MediaWiki and tweak them so that they point to a common user base. This is exactly what a plugin already does: http://www.mediawiki.org/wiki/Extension:Phpbb_Single_Sign-On

Member Avatar for smantscheff
0
386
Member Avatar for gilgil2

Have a look at mysql events. http://dev.mysql.com/doc/refman/5.1/en/events.html

Member Avatar for chophouse
0
154
Member Avatar for heshanm

Your form variable is named `class_ID`, but the mysql column name is `class_name`. Looks fishy to me.

Member Avatar for smantscheff
0
224
Member Avatar for matiqueen

Probably your forgot to change the delimiter before and after your procedure definition: DELIMITER // CREATE PROCEDURE LoginCorrecto ... ... END // DELIMITER ;

Member Avatar for smantscheff
0
199
Member Avatar for HunainHafeez

From your mysql console, run show variables like "%dir%"; The result will contain a variable named `datadir` which contains the path where you should look for data files.

Member Avatar for HunainHafeez
0
194
Member Avatar for HunainHafeez
Member Avatar for HunainHafeez
Member Avatar for anitg
Member Avatar for anand01

You're trying to get a partial tree as a result. In this setup, you will need a (recursive) (user defined) function which walks all the way up from wtshirt to dress.

Member Avatar for anand01
0
203
Member Avatar for arcticM

Along those lines: select * from tableA where b = 'y' or ((not exists (select * from tableA where b = 'y')) and a = 'x') or ((not exists (select * from tableA where a = 'x' or b = 'y')))

Member Avatar for smantscheff
0
141
Member Avatar for heshanm
Member Avatar for Mike_H

Your 2nd query is correct. If it does not return data, then the data are wrong. Show a sample. And how is "Anna" *before* "Ann" in your table? You don't have any ORDER BY clause in your query, so the word "before" makes no sense here.

Member Avatar for Mike_H
0
485
Member Avatar for xjshiya

If it runs in another interface but not in your code, then your error is in how the query is built in PHP. Debug it. Show us which query actually is posed to the server. What does the string "SELECT GROUP_CONCAT(IF((@var_ctr := @var_ctr + 1) = @cnt, location, SUBSTRING_INDEX(location,' - …

Member Avatar for urtrivedi
0
226
Member Avatar for chandbasha

http://lmgtfy.com?q=mysql+number+of+indexes http://dev.mysql.com/doc/refman/5.5/en/column-indexes.html > The maximum number of indexes per table and the maximum index length is defined per storage engine. See Chapter 14, Storage Engines. All storage engines support at least 16 indexes per table and a total index length of at least 256 bytes. Most storage engines have higher …

Member Avatar for smantscheff
0
223
Member Avatar for mhupadhyay

Use the command line tool mysqldump to dump the whole database to a file which you can then store at a safe place.

Member Avatar for simplypixie
0
134
Member Avatar for xjshiya

I don't know of any MySQL string function which would cut any strings from the `","` up to the next `"-"`. MySQL does not offer regular expression functions which might do the trick. You can write a user defined function, though, which cuts those parts and apply it to the …

Member Avatar for xjshiya
0
179
Member Avatar for chandimak

select id, lecture, Table1.subject_id, date, c, (select count(subject_id) from Table1 as t where t.subject_id = Table1.subject_id and t.date <= Table1.date and is_deleted != 1 ) as flow_id from Table1 inner join ( select subject_id, count(subject_id) as c from Table1 where is_deleted != 1 group by subject_id ) as counts on …

Member Avatar for chandimak
0
131
Member Avatar for PhilEaton

Put them behind a firewall on an encrypted drive. Let no one access the server except your application (using MySQL grants). If you need access from outside, do it over VPN. And there are tons of other security measures which you may find here: http://lmgtfy.com/?q=mysql+security

Member Avatar for PhilEaton
0
144
Member Avatar for pawan768

Have a look at MySQL events which allow you to run code at a certain time. http://dev.mysql.com/doc/refman/5.1/en/events-overview.html

Member Avatar for Octet
0
115
Member Avatar for printman55

You can, if you assign the variables first. And for readablity I think it's easier to integrate the variables in the string (at least if you're using a decent PHP editor with syntax highlighting). [CODE]$name = $result['name']; $bio = $result['bio']; Print "<tr><td class='ParaText' align='left' valign='top'>name</td><td class='ParaText'>$name</td><td class='ParaText' align='left' valign='top'>$bio</td></tr>"; [/CODE]

Member Avatar for phpkiller123
0
558
Member Avatar for Szabi Zsoldos

Show the table structure. Show the result of EXPLAIN <your query>. Do you have an index on the price and on the oen_norm field? Effectively you are grouping on oen_norm, take the minimum price of each group and filter all entries with that minimum price and a quality of 1, …

Member Avatar for Szabi Zsoldos
0
149
Member Avatar for TMacFarlane

Your query contains the string "'". The backslash is not recognized as an escape character by MySQL. Get rid of it. Where does it get into your code?

Member Avatar for smantscheff
0
246
Member Avatar for alittle

Obviously you are feeding some text from a variable into a MySQL statement which contains an apostrophe (') which is not escaped.

Member Avatar for alittle
0
253
Member Avatar for mrbarbarik

UPDATE alters all records to which the condition applies. It does not matter if it applies only to one, to several, to none or to all records. For multiple conditions add them to the WHERE clause with the boolean operators AND, NOT and OR, like in UPDATE userTable SET status …

Member Avatar for debasisdas
0
219
Member Avatar for Ebiso

Your second clause is redundant. In effect your query reads: select * from customers where id in (...) This can select at most one customer per id. Instead use: SELECT * FROM customer INNER JOIN address ON customer.ID = address.customer_ID INNER JOIN sites ON address.ID = sites.address_ID WHERE upper(customer.$field) LIKE'%$query%'

Member Avatar for smantscheff
0
365
Member Avatar for Sabyre

Check for slow queries. (Look up how to enable the slow query log in my.cnf). Check if you can optimize the slowest. Also have a look at the process list while mysql is running under high load. (`show processlist` from the mysql command line). Which processes are open? Just waiting …

Member Avatar for smantscheff
1
244
Member Avatar for selfmastery

Try the offending query from the mysql command line. Check how long it runs on the online machine and on the local server. Also the error message suggests that this is not a mysql error or timeout but a timeout of your client component. Try to increase the timeout for …

Member Avatar for smantscheff
0
484
Member Avatar for Ancient Dragon

This is a network connectivity problem. Might be that the mysql server on stoberwebcom.ipagemysql.com has to high load to response. That can happen on shared servers by other users and other applications than yours.

Member Avatar for al c
0
317
Member Avatar for newbie14

Your post is not clear. Which error occurs when? To get a synchronous insert and update behaviour, use transactions to bracket all statements.

Member Avatar for newbie14
0
242

The End.