]> git.nothing2do.fr Git - diary-shell.git/commitdiff
Merge branch 'master' of https://github.com/Nothing2Do/diary-shell
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Fri, 5 Jul 2013 11:33:10 +0000 (13:33 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Fri, 5 Jul 2013 11:33:10 +0000 (13:33 +0200)
Conflicts:
alias.sql

unknown

1  2 
alias.sql
sqldb.cpp

diff --cc alias.sql
index 209b9c53db67ffa946fc90e053ef6db68808a05f,053eca1e3b5763ada15f5106f8ac0611e86f722b..3f5449628e8351c9550f66c173a697f98a5c5c96
+++ b/alias.sql
@@@ -1,4 -1,4 +1,5 @@@
  INSERT INTO alias (nom, command, argc) VALUES ('ls', 'select id,texte from raw order by date asc;', 0);
 +INSERT INTO alias (nom, command, argc) VALUES ('search', 'select id,texte from raw where texte ~ $1 order by date asc;', 1);
+ INSERT INTO alias (nom, command, argc) VALUES ('search', 'select id,texte from raw where texte ~ $1 order by date asc', 1);
  INSERT INTO alias (nom, command, argc) VALUES ('rm', 'DELETE FROM raw WHERE id =''%1'';', 1);
  INSERT INTO alias (nom, command, argc) VALUES ('alias', 'select nom from alias;', 0);
diff --cc sqldb.cpp
index 85d28f251c54b682bc05ec0c05f0b8454f3ca71a,85d28f251c54b682bc05ec0c05f0b8454f3ca71a..315a013bb963bde72f915af5d13860c592f8f826
+++ b/sqldb.cpp
@@@ -205,7 -205,7 +205,7 @@@ bool sqlpg::alias(vector<string> a)
      //cout<<"alias start here\n";
      string cmd;
  
--    cmd="select command,argc from alias where nom='"+a[0]+"' and argc="+toString(a.size()-1)+";";// I need to select a function with argc too !
++    cmd="select command,argc from alias where nom='"+a[0]+"' and argc = '"+toString(a.size()-1)+"';";// I need to select a function with argc too !
      //cout<<"cmd="<<cmd<<endl;
      exec(cmd);
      if (PQntuples(res)<1){