0

I am creating project with Laravel Illuminate that connects to existing Firebird database using jacquestvanzuydam project. The problem is that Firebird doesn't use quotes around table and field names, but my present configuration tries to add quotes around table names in each select that it creates automatically.

How to configure Laravel or Illuminate to create SQL statements without quotes?

TomR
  • 2,696
  • 6
  • 34
  • 87
  • 2
    Firebird does support quotes (SQL standard double quotes) around objectnames, assuming you are using a dialect 3 database (which should be the default). Dialect 1 (which was deprecated in 2000) doesn't support quoted objectnames. It looks like you are either using a very old database, or you have accidentally created it as dialect 1. – Mark Rotteveel Apr 13 '16 at 14:20
  • I indeed have dialect 1 database. Laravel Furebird plugin uses function wrapTable that it inherits from base framework. I just wanted to know configuration that does not add quotes. – TomR Apr 13 '16 at 14:50
  • Is this a new project/database? If so I strongly advise you to recreate your database as dialect 3. If it isn't you might want to consider migrating anyway. It will save you from a lot of headaches, for example in dialect 1 strings are quoted using double quotes, not the SQL standard single quotes, `date` is actually a `timestamp` and some other oddities. I don't use Laravel, so I can't actually answer your question. – Mark Rotteveel Apr 13 '16 at 15:05

1 Answers1

0

try to write table name like it named in your database. in your model.

protected $table = 'TABLE_NAME';

i had that problem and solved it by written table name in uppercase

Khasan
  • 1