Question : Can I execute multiple SET statements in 1 SQL UPDATE statement?

In SQL Server 2005, is the following a valid SQL Statement:
In other words, can I execute multiple SET statements in 1 SQL UPDATE statement?

UPDATE dbo.tSOX
SET userid  = REPLACE(userid,'Mike Vicor','Joe Smith'),
SET userName = REPLACE(userName,'Vicor','Smith'),
SET userNameF = REPLACE(userNameF,'Mike','Joe')
WHERE Application = 'BRS'

Answer : Can I execute multiple SET statements in 1 SQL UPDATE statement?

sort and asort sort arrays, but DirectoryIterator is not an array, despite providing array-like access (e.g. via foreach).  Try creating an associative array from the DirectoryIterator results and sorting that, something like:

$dircontents = array();
foreach ($subdir as $filesInfo) {
  $dircontents[$filesInfo->getFilename()] = $filesInfo;
}

sort($dircontents);

foreach($dircontents as $filename => $filesInfo) {
  ...
}

Random Solutions  
 
programming4us programming4us