News: TinyPortal Release Schedule. Please read this update for More Info.

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

September 15, 2019, 08:02:00 PM

Login with username, password and session length

Recent

Members
  • Total Members: 3752
  • Latest: Alizee
Stats
  • Total Posts: 188888
  • Total Topics: 20752
  • Online Today: 80
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 52
Total: 52

Author Topic: Mysql to change article ID  (Read 221 times)

0 Members and 1 Guest are viewing this topic.

Offline wildenborch

  • Support Team
  • *
  • Posts: 347
Mysql to change article ID
« on: September 11, 2019, 11:51:45 PM »
Hi,

Can someone post the correct Mysql update code?

I want to update the category ID into another category ID for all articles with an ID less than ID 3000.

Thanks in advance,

Fred

Offline tino

  • Developer
  • *
  • Posts: 1646
Re: Mysql to change article ID
« Reply #1 on: September 12, 2019, 05:16:30 AM »
Code: [Select]
[codeUPDATE tp_articles SET category_id = ‘#’ WHERE id < ‘3000’;
Or similar to that, I’ll post the correct one when I’m home this evening.

Offline wildenborch

  • Support Team
  • *
  • Posts: 347
Re: Mysql to change article ID
« Reply #2 on: September 12, 2019, 12:05:00 PM »
Thanks Tino,

I tried and changed some things and for me this code worked:

Code: [Select]
UPDATE smf_tp_articles SET category = "459" WHERE id < "3088"
Fred

Offline tino

  • Developer
  • *
  • Posts: 1646
Re: Mysql to change article ID
« Reply #3 on: September 12, 2019, 12:29:43 PM »
Glad you worked it out.

Hope you’re well.

Offline wildenborch

  • Support Team
  • *
  • Posts: 347
Re: Mysql to change article ID
« Reply #4 on: September 14, 2019, 03:52:48 PM »
Yes I'm well! Thank you very much.

I recently received a letter from a lawyer informing me that on one of my sites a copyright picture was used and I had to pay a compensation fee of € 280.
First I thought it was fake / fraud but it turned out to be true.
Together with a trademark / copyright lawyer from work we looked into it but the conclusion was that I had to pay!

"fortunately" I managed to reduce the compensation fee with € 90,00

The picture on my site was a thumbnail of 150 * 90
it was a picture of a well known dutch football stadion called "de kuip"

I have now removed all pictures from that site.