|
----
Let's put it this way: I combined the selected image IDs into a string in the background of the page, separated by commas, such as: "1,2,3,4,6,7,8,"
This is passed to the stored procedure. The stored procedure splits the string of IDs, and then the name field is "tested" based on these IDs.
.......
The brother upstairs has given:
wwhhoon
CREATE PROCEDURE Test
@idString NVARCHAR (1000) // If its value is 1,2,3,4,6,7,8
AS
DECLARE @sql NVARCHAR (2000)
SET @sql = "UPDATE Images SET [Name] = 'Test' WHERE (ID IN ('" + @idStrings + "')"
exec @sql
@idStrings is a combination of the above from your code in the form:
imgeid1, imageid2, imageid3 |
|