The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Changing all rows in a table from a selected field.
Couldn't think how to title this one.
In my table, I have a field called 'cid'. There are 518 rows at the moment, I need to change the URL because it takes up a lot of space. I want the url to be changed to a special part of the URL, the "character id" string. The URL looks like this: (dont forget to add https://www it shows up funny on forum so I removed it.) .novaworld.com/NWCommunities/charStats.aspx?id=xxxxxxxxxxx&productid=xxxxxx&pla yerCard=1 The first string 'id' is the string I need all the 'cid' fields changed to. This is the character id string. The second 'productid' string, is the ID of a certain game (3 different IDs atm). Space isn't the only reason I want this changed. I currently have it so that it only shows stats from the certain game, even if the player plays more than that 1 game. So with the character ID, I could just build a URL for their stats to each game, if you see what I mean. See attachment for the piece of the URL I need. Is it possible to update all 518 fields from: (dont forget to add https://www it shows up funny on forum so I removed it.) .novaworld.com/NWCommunities/charStats.aspx?id=xxxxxxxxxxx&productid=496057&pla yerCard=1 to xxxxxxxxxxx only? Even if this is done via script, or perhaps even a phpMyAdmin query. I believe it'd need a regexp of some kind to get 'xxxxxxxxxxx' from the string? Maybe not? This is the only bit I need help with, getting 'xxxxxxxxxxx' from that url string. Thx for help. |
#2
|
|||
|
|||
I don't understand what you are looking to do, can you provide us with some sample info and show us how you want it changed?
|
#3
|
|||
|
|||
Difficult to explain lol.
I need a specific part of a URL. Then I need to make a script which replaces each URL with the string of the URL I need. The url is: // ignore the space https://www .novaworld.com/NWCommunities/charStats.aspx?id=xxxxxxxxxxx&productid=496057&pla yerCard=1 I need to get the xxxxxxxxxxx bit out of that URL string. Possible? |
#4
|
|||
|
|||
Quote:
PHP Code:
|
#5
|
|||
|
|||
I figured it out, but I ballsed my database up.
It changed all the CID to the 1st CID only. I can't figure out why it did that. PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|