我有以下代码来返回我想要的字符串
$sql = "
SELECT `description`
FROM `auctions`
WHERE `description` REGEXP '[0-9]{10}'
";
但是我需要为这样的事情运行更新查询
UPDATE `url`
FROM `auctions_media`
WHERE `url` = "$sql" AND `auction_id` = SomeNumber
我如何匹配表,以便auction_id
forauctions
表与auction_id
inauctions_media
表匹配?
我希望代码遍历所有行,从描述中返回字符串,然后将其用于更新查询