News: Welcome to the TinyPortal Support site.

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

January 28, 2020, 07:21:15 PM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189429
  • Total Topics: 20795
  • Online Today: 257
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 0
Guests: 119
Total: 119

Author Topic: Mysql to change article ID  (Read 1474 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: 1712
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: 1712
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.