1
coops
mySQL question
  • 2005/10/28 21:33

  • coops

  • Just popping in

  • Posts: 82

  • Since: 2005/6/15


OK, I know this is probably really simple but if anyone knows mySQL, please help!

I've converted my forum from ipb->phpbb->cbb and have ended up with alot of code within the posts. Save editing this manually, I want to run a query that will fix it.

The posts look something like this:
...as something for [i:174155571e]our[/i:174155571e] benifit. when infact it's the other way around. we need to...

But the number is always different. So is the text surrounding it!

Can anyone show me the query to use?

2
McDonald
Re: mySQL question
  • 2005/10/29 0:25

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


You can export the mySQL table to MS Excel or CSV file format with phpMyAdmin.
Then in a spreadsheet program or text editor like ConText you can do a 'Find and Replace' using wildcards for the numbers.

Example for MS Excel:
Find: [i:*
Replace: [i]

After this you can save the file and import it in mySQL.

3
coops
Re: mySQL question
  • 2005/10/29 0:44

  • coops

  • Just popping in

  • Posts: 82

  • Since: 2005/6/15


thanks but I already tried with with excel, any post that wasn't short brought up the error "formula is too long", and that was most of the posts, so that idea worked but ms has some stupid limit on it.

4
coops
Re: mySQL question
  • 2005/10/29 0:45

  • coops

  • Just popping in

  • Posts: 82

  • Since: 2005/6/15


it gets even more tricky because i want to keep the text that is after the [i:1234567] thing, so to replace [i:* would be to loose all that text

5
McDonald
Re: mySQL question
  • 2005/10/29 1:03

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Then you do the following in MS Excel:

Find : [i:*]
Replace :

and

Find : [/i:*]
Replace :


If you use this the ':number' will be removed and the surrounding text will be kept.

6
McDonald
Re: mySQL question
  • 2005/10/29 1:27

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Sorry about that, Excel can't handle the long tables, neither can MS Notepad or MS Word.
ConTEXT can handle the long tables, but there is no option to use wildcards with Find/Replace.
Maybe you can split up the table in smaller parts that will be acceptable for Excel.

7
coops
Re: mySQL question
  • 2005/10/29 1:27

  • coops

  • Just popping in

  • Posts: 82

  • Since: 2005/6/15


I'm still faced with the problem of the "Formula too long" message that comes up for most of the cells due to each line.

I can't do it in a text edior because i loose the "\n" in the sql code. That will mess things up for imoprting it back into mySQL.

I tried ConTEXT but it doesnt seem to support wildcards.

8
coops
Re: mySQL question
  • 2005/10/29 1:29

  • coops

  • Just popping in

  • Posts: 82

  • Since: 2005/6/15


lol, you are quick off the mark! i'll keep playing around and let you know if i find a solution... :)

Login

Who's Online

512 user(s) are online (429 user(s) are browsing Support Forums)


Members: 0


Guests: 512


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits