Skip to content
Advertisement

SQL Server fetch data php

I want to pull the data in the database by connecting to SQL Server. I can connect to SQL Server but I can’t print the data. I get blank screen output. What is the problem?

JavaScript

Advertisement

Answer

You have a syntax error in the generated T-SQL Statment – missing spaces before FROM and WHERE. The generated statement is SELECT form_adres, form_sehir, form_adsoyadFROM databasename.omg_user.ie_formWHERE form_no='15275'. Fix the statement and always check the result from mssql_query() execution:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement