php - Cannot access empty property - Laravel -


i trying current week following mssql query in laravel 4:

db::connection('db')->select("select datepart(week, '" . $today . "')"); 

however returns

type: symfony\component\debug\exception\fatalerrorexception message: cannot access empty property file: c:\project\vendor\laravel\framework\src\illuminate\database\connection.php

my guess doesn`t work if there no "from" statement, strange. suggestions on how can workaround appreciated.


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -