开发者

Massive URL Decode in MySQL

开发者 https://www.devze.com 2023-04-08 14:20 出处:网络
I have a MySQL table with 10,000+ entries. There are four columns in the table.One of them开发者_StackOverflow is URL.Some of the URL values are encoded, some are decoded.I want to have them all be de

I have a MySQL table with 10,000+ entries. There are four columns in the table. One of them开发者_StackOverflow is URL. Some of the URL values are encoded, some are decoded. I want to have them all be decoded.

How can I do this either with PHP directly or MySQL?

Thanks!


Is this what you want?

$result = $db->query("SELECT encoded_url FROM table");
while($row = mysql_fetch_assoc($result)){
    $decoded = your_function_to_decode($row['encoded_url']);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消