Home : General : Perl Programming :

General: Perl Programming: Re: [Chaz] perl with mysql (join sugestion ): Edit Log

Here is the list of edits for this post
Re: [Chaz] perl with mysql (join sugestion )
How can they possible do it with a code like

$name = $form->param('name');
$city = $form->param('city');

$sql_data = "id = '$id'";

if($name ne '') {
$sql_data .= " AND name = '$name'";
}

if($city ne '') {
$sql_data .= " AND city = '$city'";
}

# and so on
$sql = "SELECT * FROM users WHERE $sql_data ORDER BY name";

i think if they increse a ; into 1 of that value they would be disconsider as command.

wont it ?

Last edited by:

NamedRisk: Jul 13, 2005, 9:38 PM

Edit Log: