Hello,
i´m using the 3.23.57 version and i´ve declared a native function, but when
i call it (SELECT GETUPDATE(1);) i
get this line

ERROR 1064: You have an error in you SQL syntax near '(1)' at line 1;

I think i´ve followed all the steps right:

    1)added the line in lex.h

        {"GETUPDATE"      ...)

    2)added this line to item_create.h

        Item *create_func_getupdate(Item* a);

    3)added this definition to item_create.cc

        Item *create_func_getupdate(Item* a){
        return new Item_func_getupdate(a);}

    4)added this to item_func.h

        class Item_func_getupdate :public Item_num_func
        {
        public:
          Item_func_getupdate(Item *a) :Item_num_func(a) {}
          const char *func_name() const { return getupdate"; }
          double val();
          longlong val_int();
          enum Item_result result_type () const  { return INT_RESULT; }
          void fix_length_and_dec() { decimals=0; max_length=21; }
        };

    5) and at last added this to item_func.cc

        longlong Item_func_getupdate::val_int()
        {
            FILE *fic;
            fic = fopen("gus.txt","w");
            fprintf(fic,"Ejecucion \n");
            fclose(fic);
            return 0;
        }

as you may see it´s a simple program which the only thing it has to do it´s
printing
that line (in the future it will do more things, but until then...).
I really need help because this is getting on my nerves!
Anyways, thank you very much!



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to