suppressed wrote:Kevin gave the solution to change: @array = split(/-/,$CGI->{from}); in@array = split(/\0/,$CGI->{from}); What confuses me in this is that above you say that you have returned the sql string from this perl block and with that you got a correct query. Perhaps Kevin can shed a light on that one aswell? I'd think that you would not be able to have done a split with the - , so there would not have been a correct sql query in the first place? Or is there something magic going on?The <form> variables are always stacked using an ASCII NUL character. If you then add your own character (say "-") then the resulting stackof "A-" and "B-" would be "A-\0B-".If the above string is split on "-" then you would get "A" and "\0B". The SQL, as it stood, would make an additional AND clause using "\0B"and therefore find no results.If there was only a "A-" in the original stack then you would get just an "A" out of the split. In that case, there would be no extra AND clauses with ASCII NUL characters to mess up the SQL, and so itwould work as expected.
* is not worthy * ;) Thanks Kevin! :) Maybe you'd like to stick this tutorial on interchange.rtfm.info ! ;)
_______________________________________________ interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.