Skip to content
Advertisement

Tag: sql-server

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

pdo connect convert to MSsql and fetch data

I had such code, which works fine and I need to get same result then I convert my database connection And now I converting this code to: How to get THE SAME RESULT AS IN MY FIRST CODE WITH PDO Connection ? At first PDO example I get echo $json such data structure: Answer Working example: Notes: Example is tested

Advertisement