|
|||||||
New to SitePoint Forums? Register here for free!
|
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Member
Join Date: Dec 2008
Posts: 19
|
How to set a variable if a row already exists?
I have a table like so:
SQL Code:
Currently I'm doing this like so: MySQL Code:
Is there a better way of setting the @sURL to the value of sURL if the record already exists? The full procedure looks like this: SQL Code:
P.S. Most records will be new, so trying to insert the record first rather than trying to select it first is much faster. Thanks Dave |
|
|
|
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 00:55.








Threaded Mode