I'm working on some code that has potentially several things amiss, but this is something I found and I want some other eyes on it. I don't know if this is a dealbreaker, but tell me what you think:
Here's the function as it looks currently...
$sql = "select Account.* from Account (nolock)
JOIN Practice (nolock) on Practice.Practiceid = Account.PracticeID
Join Client (nolock) on Client.Clientid = Practice.ClientID
Where dbo.ufn_AccountCurrentBalance(Account.AccountID) > 0
--and Client.ClientStatusCode not in ('HD', 'ST')
and Account.Accountid = $accountid";
Notice the line that is prefaced with "--." Now, I understand that works fine in MSSQL Studio, but after testing it with some other scenarios, it doesn't resonate in PHP as a "comment." Rather, it produces an error.
If I'm correct, I may very well be regarded as a hero in the workplace for figuring this puppy out.
Let me know if I need to get my cape...