Relaties :: Familie

Relaties :: Familie is een DBI / DBD :: MySQL relationele query-motormodule.
Download nu

Relaties :: Familie Rangschikking & Samenvatting

Advertentie

  • Rating:
  • Vergunning:
  • Perl Artistic License
  • Prijs:
  • FREE
  • Naam uitgever:
  • Relations::Family team
  • Uitgever website:
  • http://search.cpan.org/~gaffer/Relations-Family-0.94/Family.pm

Relaties :: Familie Tags


Relaties :: Familie Beschrijving

Relations :: Familie is een DBI / DBD :: mysql Relationele Query Engine module. Relations :: Familie is een DBI / DBD :: mysql Relationele Query Engine module.SYNOPSIS # DBI, Relations :: Familie Script dat sommige vragen creëert. #! / Usr / bin / perl gebruik DBI; gebruik Relations :: Familie; $ Dsn = "DBI: mysql: finder"; $ Username = "root"; $ Password = ''; $ Dbh = DBI-> connect ($ dsn, $ username, $ password, {PrintError => 1, RaiseError => 0}); $ Abstract = new Relations :: Abstract ($ dbh); $ Familie = new Relations :: Familie ($ abstract); $ Familie-> add_member (-name => 'rekening', -label => 'Cust. Account', -Database => 'vinder', -table => 'rekening', -id_field => 'acc_id', -query => {-selecteer => { 'id' => 'acc_id', 'label' => "concat (cust_name, '-', balans)"}, -van => , -wanneer => "customer.cust_id = account.cust_id", -order_by => "cust_name"}); $ Familie-> add_member (-name => 'klant', -label => 'Customer', -Database => 'vinder', -table => 'klant', -id_field => 'cust_id', -query => {-selecteer => { 'id' => 'cust_id', 'label' => 'cust_name'}, -uit => 'klant, -order_by => "cust_name"}); $ Familie-> add_member (-name => 'aankoop', -label => 'Inkoop', -Database => 'vinder', -table => 'aankoop', -id_field => 'pur_id', -query => {-selecteer => { 'id' => 'pur_id', 'label' => "concat (cust_name, '-', DATE_FORMAT (datum, '% M% D% y'))"}, -uit = > , -waar => 'customer.cust_id = purchase.cust_id', -order_by => }); $ Familie-> add_lineage (-parent_name => 'klant', -parent_field => 'cust_id', -child_name => 'aankoop', -child_field => 'cust_id'); $ Familie-> add_rivalry (-brother_name => 'klant', -brother_field => 'cust_id', -sister_name => 'rekening', -sister_field => 'cust_id'); $ Familie-> set_chosen (-label => 'Customer', -ids => '2,4'); $ Beschikbaar = $ familie-> get_available (-label => 'Inkoop'); print "Found $ beschikbaar -> {count} Aankopen: n"; foreach $ id (@ {$ beschikbaar -> {ids_array}}) {print "Id: $ id Label: $ beschikbaar -> {labels_hash} -> {$ id} n"; } $ Familie-> add_value (-name => 'Cust account', -SQL => "concat (cust_name, '-', balans)", -member_names => 'customer rekening'); $ Familie-> add_value (-name => 'Paid', -SQL => "if (saldo> 0, 'NO', 'JA')", -member_names => 'rekening'); $ Familie-> add_value (-name => 'Customer', -SQL => 'cust_name', -member_names => 'klant'); $ Familie-> add_value (-name => 'Inkoop', -SQL => "concat (cust_name, '-', DATE_FORMAT (datum, '% M% D,% Y'))", -member_names => 'aankoop ,klant'); $ Reünie = $ familie-> get_reunion (-data => 'Paid, Inkoop', -use_labels => 'Customer', -order_by => 'Customer, Purchase'); $ = $ Abstract-matrix> select_matrix (-query => $ hereniging); afdrukken "gevonden". scalaire @ $ matrix. "Waarden: n"; foreach $ row (@ $ matrix) {print "Klant: $ row -> { 'Customer'} n"; afdrukken "Aankoop: $ row -> { 'Inkoop'} n"; afdrukken "Betaalde: $ row -> { 'Paid'} nn"; } $ Dbh-> disconnect (); Vereisten: · Perl


Relaties :: Familie Gerelateerde software