Could someone please look at the following and see if they can tell me why this might not work or rather why I get an error at the end.
alias tests {
echo -a $dll(mysql.dll,Connect,main -uwd %username %pass %dbase)
var %query = SELECT table FROM test WHERE table='testing' OR table='testing1' ORDER BY preid ASC
echo -a $dll(mysql.dll,Query,main %query)
var %n = echo -a $dll(mysql.dll,rows,main)
echo -a $dll(mysql.dll,fields,main)
var %i = 1
while (%i <= %n) {
echo -a $gettok($dll(mysql.dll,fetchrow,main %i 32),6-,32)
inc %i
}
echo -a $dll(mysql.dll,Close,main)
}
Here is what it returns
1 010 Connect main
1 022 Query main 1
1 023 Fields main 1 table
testing1
testing
-
* /echo: insufficient parameters (line 68, test.mrc)
-
a breakdown of the text =
1 010 Connect main =
<a> <b> <c> [d]
Where <a> would be 1 or 0, signifying success and failure, respectively, <b> would be the error
code number, <c> would be the function name, and [d] would be any additional information.
Last edited by ShavedApe; 30/05/03 11:22 PM.