I have imported my database by script from live site to my local server.
I have menu system dynamically generated by database. they are in table like below:
id name linkpage
1 blog http://www.example.com/blog/index.php
2 about http://www.example.com/blog/about.php
I have to change live url in to my local url like http://www.example.com/blog/index.php to http://localhost/mysite/blog/index.php
How can I update link page column with mysql query ?
It's simple. You can do with replace function:
UPDATE tablename SET linkpage=REPLACE(linkpage,'www.example.com','localhost/nysite')
with replace function;
mysql_query("UPDATE your_tablename SET linkpage=REPLACE(linkpage,'www.your_link.com','localhost/mysite')")