|
From: Grant P. <gp...@th...> - 2005-12-30 02:20:32
|
:-) Sorry Jamie, not the table name ... this part: WHERE ? LIKE ?; the first ? would not work. (to select the field or column name.). ----- Original Message ----- From: "Jamie Cameron" <jca...@we...> To: <web...@li...> Sent: Friday, December 30, 2005 1:10 PM Subject: Re: [webmin-l] Custom Mysql Hi Grant, Unfortunately you can't use table names as parameters like that. Only values in the SQL expressions can be parameters, like in my original example.. - Jamie -----Original Message----- From: "Grant Peel" <gp...@th...> Subj: Re: [webmin-l] Custom Mysql Date: Fri 30 Dec 2005 10:32 am Size: 2K To: <web...@li...> Kewl, -thanks! should this work? SELECT user, ip, domain FROM tbl_name When I replace the first ? with a real field name (ie 'domain') it works fine. But when I run the above, it just shows the column names with no data. -Grant P.S. I have a local copy of the Mysql handbook, and am reading :-) ----- Original Message ----- From: "Jamie Cameron" <jca...@we...> To: <web...@li...> Sent: Friday, December 30, 2005 9:14 AM Subject: Re: [webmin-l] Custom Mysql Hi Grant, The SQL custom commands use a ? to indicate a parameter, which is standard with SQL. The first parameter in the command will replace the first ? and so on .. - Jamie -----Original Message----- From: "Grant Peel" <gp...@th...> Subj: [webmin-l] Custom Mysql Date: Fri 30 Dec 2005 3:16 am Size: 1017 bytes To: <web...@li...> Hi all, FOrgive me if this has been covered somewhere else, but how does one use parameters in the custom->sql commands section? I keep getting errore like these: Executing SQL command SET par1=$INPUT; SET par2=$FIELD; SELECT user, password, domain, ip, host_machine FROM clients WHERE domain LIKE @par1; .. .. execution error : called with 1 bind variables when 0 are needed I get them even if I don't use the 'set' variables parm. I have tried every escape sequence I can think of. -GRant ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click - Forwarded by the Webmin mailing list at web...@li... To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-list ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click - Forwarded by the Webmin mailing list at web...@li... To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-list --- message truncated --- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click - Forwarded by the Webmin mailing list at web...@li... To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-list |