]> git.nothing2do.fr Git - diary-shell.git/commitdiff
a logicak tweak with alias and an add to README.md
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sun, 23 Jun 2013 19:56:10 +0000 (21:56 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sun, 23 Jun 2013 19:56:10 +0000 (21:56 +0200)
README.md
sqldb.cpp

index c061220cfb1af33d168abdf32a8ddc881c652a67..5c4eb54bd552b9e2ea913b374fa7d2a5a00dc028 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,4 +5,4 @@ a modern diary
 
 to get a full source tree, type : git clone https://github.com/Nothing2Do.eu/diary-shell.git
 cd to diary-shell, ./howto-compile.sh should compile it under diary-shell !
-
+to put you modification to the server : "git commit -a" and "git push"
index d3abf8c7e580d41fa6b55a1e91d5f0c2dea833d0..81b851b36baa1059a7d1b78f5ae52e51f54c1161 100644 (file)
--- a/sqldb.cpp
+++ b/sqldb.cpp
@@ -252,8 +252,8 @@ bool sqlpg::alias(vector<string> a){
     int argc;
     argc=PQgetvalue(res, 0, 1);
     char * value[argc];
-    for (int i=0; i<a.size(); i++){
-        value[i]=a[i].c_str();
+    for (int i=1; i<a.size(); i++){
+        value[i-1]=a[i].c_str();
     }
     PQexecParams(conn, cmd2.c_str(), argc, NULL, value, NULL, NULL, 0);
     print();