mercredi 20 juillet 2016

I've tried to convert it to work with Laravel's DB class except it's not returning anything

I am trying to convert my Sql Query to Laravel Query and I am getting Error :?

SQLSTATE[HY000]: General error: 2809 General SQL Server error: Check messages from the SQL Server [2809] (severity 18) [(null)] (SQL: GetRegisteredUserData)

My query1:

SELECT * FROM  RegisteredUser WHERE DateCreated between '$startDate' AND  '$endDate' ORDER BY Yr DESC,MnthNo DESC

My query2:

SELECT * from  UserData where((Yr * 10000 + Mnth * 100 + 1) BETWEEN $startDate AND $endDate) ORDER BY Yr Asc, Mnth Asc

Aucun commentaire:

Enregistrer un commentaire