Wemin - custom sql command with varables

Webmin
londonnet
2014-02-07
2014-02-20
  • londonnet

    londonnet - 2014-02-07

    I'm trying to add a custom command in webmin but I am getting the following error message:

    I'm trying to add a custom command in webmin but I am getting the following error message:

    execution error : called with 1 bind variables when 0 are needed

    I have seen some topics on this matter via google but none have worked for me.

    The variable name is startdate and so I have tried the following in my sql command:

    BETWEEN '$startdate 00:00:00' AND
    BETWEEN '? 00:00:00' AND
    BETWEEN ':1 00:00:00' ANDand with quotes round it but none replace with the desired variable.

    I am running the latest version of webmin and mysql

    Any ideas what else I can try?

    Thanks

     
    Last edit: londonnet 2014-02-07
  • gandolf

    gandolf - 2014-02-20

    you command looks to be reading the 'bind' function keys = ? and maybe :. you can try escaping them or double quotes. so you are trying to store this cc into a mysql table and as an sql query? it can be reeeeeeeealy tricky depending on your mysql version syntax. might be better as a cj.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks