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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -