
poochman
Novice

Jun 20, 2009, 5:29 PM
Post #3 of 4
(8208 views)
|
Re: [FishMonger] conditional printing
[In reply to]
|
Can't Post
|
|
Here is the code, and some sample output. I want to only print the lines that contain table1_bak and table2_bak, and ignore the blank lines $sql = "select rtrim(substring(o.name,1,40)) from sysobjects o, sysusers u where o.type = 'U' and o.uid = u.uid and u.name = 'dbo' and o.name like '${tbl}_%'"; $sth = $dbh->prepare($sql); $sth->execute; ($response) = $sth->fetchrow_array(); print "Table = $response\n"; ****************** output **************** Table = Table = Table = table1_bak Table = Table = table2_bak
|