OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Sql Query- HELP!!

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Sql Query- HELP!!
Page: [1]
 
calmstorm

 

Posts: 16
Joined: 6/17/2002
From:
Status: offline

 
Sql Query- HELP!! - 6/26/2002 13:14:18   
Hi People

So the White Paper for file uploading and adding data to the DB is all good - but I' ve run into a snag.

I was running under a test web and have now moved to the physical web - but when i added data it has stored the path to the file like this
http://myweb.com/testweb/files/photo.jpg

I need to run a query that will change all the paths to
http://myweb.com/files/photo.jpg

please help me with the sql to do this.
I created in FP with webbots and do not have a version of ACCESS on my computer. I' d like to do it with a query via FP - is this possible???
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Sql Query- HELP!! - 6/26/2002 14:47:48   
A couple of ways maybe. Of course backup your db before doing any of this.

1. <% myNewField=Replace(myField," testweb" ," files" )%>

2. <% myNewField = " http://myweb.com/files" & Right(myField,(Len(myfield)-24)) ' ---24 characters up to the ' /' after ' testweb' ..

then you could loop thru the records something like:

for i - 1 to numberOfRecords
myNewField=Replace(myField," testweb" ," files" )
UPDATE DISTINCTROW myTable SET myField = myNewField WHERE RecordID = RecordID
next

Of course you' ll have to grab RecordID along the way, but I think you get the idea. Another way would be to use GETROWS but that is probably too complex for this one-time problem.

Hope it helps...

(in reply to calmstorm)
calmstorm

 

Posts: 16
Joined: 6/17/2002
From:
Status: offline

 
RE: Sql Query- HELP!! - 6/26/2002 16:48:16   
Thank you - i managed to get the problem sorted out.

I have posted a new thread for another question i have.
Does this forum require using the same thread for a different question or a new thread????


(in reply to calmstorm)
Spooky

 

Posts: 26681
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Sql Query- HELP!! - 6/27/2002 2:47:57   
If its sort of related, it is good to have some background info, otherwise start a new one :-)

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to calmstorm)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Sql Query- HELP!!
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts