Michel, Maybe I've been at this too long today. The following is what I'm running: drush sqlq CREATE TABLE semaphore ( `name` VARCHAR(255) NOT NULL DEFAULT '', `value` VARCHAR(255) NOT NULL DEFAULT '', `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) ) It returns, the following: -bash: syntax error near unexpected token `(' I'm just not seeing the error of my ways. Thanks
On one of my systems CREATE TABLE semaphore ( `name` varchar(255) NOT NULL DEFAULT '', `value` varchar(255) NOT NULL DEFAULT '', expire double NOT NULL, PRIMARY KEY (`name`), KEY expire (expire) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; On Sun, Mar 14, 2010 at 8:06 PM, Lanny Trager <lanny@cybernex.net> wrote:
Michel,
Maybe I've been at this too long today. The following is what I'm running:
drush sqlq CREATE TABLE semaphore ( `name` VARCHAR(255) NOT NULL DEFAULT '', `value` VARCHAR(255) NOT NULL DEFAULT '', `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) )
It returns, the following:
-bash: syntax error near unexpected token `('
I'm just not seeing the error of my ways.
Thanks
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Rev. Jim Tarvid, PCA http://ls.net http://drupal.ls.net http://crossleft.org
Lanny Trager ha scritto:
Michel,
Maybe I've been at this too long today. The following is what I'm running:
drush sqlq CREATE TABLE semaphore ( `name` VARCHAR(255) NOT NULL DEFAULT '', `value` VARCHAR(255) NOT NULL DEFAULT '', `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) )
It returns, the following:
-bash: syntax error near unexpected token `('
I'm just not seeing the error of my ways.
Thanks
The double quotes " Try to exec: drush sqlq "CREATE TABLE semaphore ( `name` VARCHAR(255) NOT NULL DEFAULT '', `value` VARCHAR(255) NOT NULL DEFAULT '', `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) )" M. -- Michel 'ZioBudda' Morelli michel@ziobuddalabs.it Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660 http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ziodrupal.net MSN: michel@ziobuddalabs.it JABBER: michel@ziobuddalabs.it
On Sun, 14 Mar 2010, Lanny Trager wrote:
Maybe I've been at this too long today. The following is what I'm running:
drush sqlq CREATE TABLE semaphore ( `name` VARCHAR(255) NOT NULL DEFAULT '', `value` VARCHAR(255) NOT NULL DEFAULT '', `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) )
It returns, the following:
-bash: syntax error near unexpected token `('
I'm just not seeing the error of my ways.
You've forgotten (or never known?) that the shell processes all of those punctuations, before drush ever gets them to pass on. In this case, all of the '' entries would have been skipped, and the `...` items would have been tried as commands to run. However, it also interacts with the (...), which it sees as a subshell encapsulation, and that has priority, so it bombed at that level. Try it this way: drush sqlq 'CREATE TABLE semaphore ( `name` VARCHAR(255) NOT NULL DEFAULT "", `value` VARCHAR(255) NOT NULL DEFAULT "", `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) )' Luke
participants (4)
-
Jim Tarvid -
Lanny Trager -
Luke -
Michel Morelli