in reply to Re: Passing data from one perl script to another.
in thread Problem constructing an SQL query with LIKE clauses

Here is more of the script in question: . .
} elsif ($Product) { sql(); $port = $Product; $Field = 'Product'; ProcessSQL(); . . . sub sql { $SQLCommand = <<SQL; SELECT Client,Product,Issue,Cause,Date,id,Call FROM support WHERE Client LIKE ? AND Product LIKE ? AND Issue LIKE ? AND Cause LIKE ? AND SupportDetails LIKE ? AND Date LIKE ? SQL } . . . sub ProcessSQL { ExecuteSQL(); print; close_dbi($dbh); } . . . sub ExecuteSQL { $dbh = open_dbi(); print "<body bgcolor='#FFFFCC'> <TABLE BORDER=0 width=840 cellpadding=2 align=center bordercol +or='#FF9933' bgcolor='#FF9933'> <TR><TH><font face=Arial size=2>Edit</TH><TH><font face=Arial size=2>R +eg. No.</TH><TH><font face=Arial size=2>Product</TH><TH><font face=Ar +ial size=2>Issue</TH><TH><font face=Arial size=2>Cause</TH> <TH><font face=Arial size=2>Date</TH><th><font face=Ar +ial size=2>Case</th></TR> <font face='Courier'> <form name='form1' method='POST' action='ISeeSupportViewDetail +s.pl'> <p>"; my $sth = $dbh->prepare("$SQLCommand") or err_trap("Cannot pre +pare the load_category_names query"); $sth->execute($Client,$Product,$Issue,$Cause,$SupportDetails,$ +Date) or err_trap("Cannot execute the SQL query to SQL COMMAND"); $i=1; while (($Client,$Product,$Issue,$Cause,$Date,$filler,$Call) = +$sth->fetchrow_array) { print "<Tr> <td width='15' height='20' bordercolor='#FFFFCC' bgcol +or='#FFFFCC'>"; print ("<input type='radio' name='radio' value='$i' >" +); print "</td> <td width='60' height='20' align='left' bordercolor='# +FFFFCC' bgcolor='#FFFFCC'><font face= 'Arial' size='1'>&nbsp;$Client</td> <td width='100' height='20' align='left' bordercolor=' +#FFFFCC' bgcolor='#FFFFCC'><font face= 'Arial' size='1'>&nbsp;$Product</td> <td width='220' height='20' align='left' bordercolor=' +#FFFFCC' bgcolor='#FFFFCC'><font face= 'Arial' size='1'>&nbsp;$Issue</td> <td width='220' height='20' align='left' . . .