hello all i just want to give thanx for all forums that i taught alot from it :) and here are two scripts that are simple but i felt i done something i want to show it to you :)
#!/usr/bin/perl use warnings; use strict; use DBI; #step1 - create connection object my $dsn = 'DBI:mysql:khalid'; my $user = 'adam'; my $password = 'secret'; my $conn = DBI->connect($dsn,$user,$password) || die "Error connecting +" . DBI->errstr; open HAN, "It" || die "No file"; my @newrecords = <HAN>; foreach (@newrecords) { my @col = split; my $first_name = $col[0]; my $last_name = $col[1]; my $job = $col[2]; #step2 - insert/update/delete queries. $conn->do("INSERT INTO khalid(first_name,last_name,job)VALUES('$first_ +name','$last_name','$job')") || die "Error preparing query" . $conn- +>errstr; }
#!/usr/bin/perl use warnings; use strict; use DBI; #step1 - create connection object my $dsn = 'DBI:mysql:firstDB'; my $dsn2 = 'DBI:mysql:fruit'; my $user = 'adam'; my $password = 'secret'; my $conn = DBI->connect($dsn,$user,$password) || die "Error connecting +" . DBI->errstr; my $conn2 = DBI->connect($dsn2,$user,$password) || die "Error connecti +ng" . DBI->errstr; #step2 - define query my $query = $conn->prepare('SELECT * FROM guests') || die "Error prep +aring query" . $conn->errstr; my $query2 = $conn2->prepare('SELECT * FROM fruits') || die "Error pr +eparing query" . $conn->errstr; #step3 - execute query $query->execute || die "Error executing query". $query->errstr; $query2->execute || die "Error executing query". $query2->errstr; #step4 - return results my @results; my @results2; while (@results = $query->fetchrow_array()) { my $autoID = $results[0]; my $first_name = $results[1]; my $last_name = $results[2]; my $age = $results[3]; my $comments = $results[4]; my $date_entered = $results[5]; print "autoID is : $autoID \n first_name is : $first_name \n last_name + is : $last_name \n comments are : $comments \n date_entered = $date_ +entered \n "; } while (@results2 = $query2->fetchrow_array()) { my $name = $results2[0]; my $colour = $results2[1]; print "the name of fruit is : $name \n the colour of the fruit : $colo +ur\n" } if ($conn->rows == 0) { print "No Records!"; } if ($conn2->rows == 0) { print "No Records!"; }
so i want know to figure out my way i made a post before about the webmin and how to make a subset of it and i want agood and simple book that i can start with to help me in that issue ..... THANKS FOR ALL AGAIN :)

In reply to thanx for this great forums :) by adam_blackice

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.