Skip to content
Advertisement

Tag: sqlsrv

SQL-Server Select returning null on PHP

I have a query that returns all the data while running at MSSQL, but when I try to get the result with php code it returns null SELECT: PHP CODE: Answer I’ve found the problem The problem was the encoding, I put the $query inside of utf8_encode(), and now it is returning the results. Thank you all for your time.

Send PHP Error if No Rows Created

I’m trying to prevent duplicate rows from being created. My current statement works, meaning it prevents duplicates from being created, but it always returns the execution as a success, meaning I don’t get an “error” message if no rows were created. Thanks I would like to fail the sql execution if nothing was created, which isn’t done in this case.

PHP get return value of stored procedure

I have pleasure to work with legacy PHP application using SQL Server via PDO. How in PHP can I retrieve return value of stored procedure which is using RETURN statement as output channel? Example procedure If possible, I would prefer to not modify procedure. I am aware that there are similar questions, but they don’t cover this case Get RETURN

Advertisement