Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Local Lotto Information SQL and table creation
  • Posted: 11.01.2005, 03:37
     
    edfel
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    02.09.07
    Posts:
    831
    Hi.

    I will venture to get a module to display Local Lottery numbers. I need help with the SQL file tou. Basically I want to show:

    Results by date. The DB will store the winning numbers for showing if person want.

    1- Main The Lotto have a 6 numbers result
    2- We have another prize called Pega 4 -> 4 numbers
    3- Pega 3 --> 3 numbers
    4- Pega 2 --> 2 numbers

    Also, the DB should have a table for next Lotto and estimated prize.

    Basically I am looking for a functionality similar to the Lotto module available at the link below. The problem besides it being a nuke mod is the license is closed. So I have to create it from zero...

    http://www.preciogasolina.com/

    I have made some 'hacks' and I am somohow :wink: familiar with PHP code and I think I could develop it. The example module should be helpful also.

    Thanks in Advance

    Edfel :wink:
  • Posted: 11.01.2005, 04:39
     
    edfel
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    02.09.07
    Posts:
    831
    I found this... so I have an idea ...

    # phpMyAdmin SQL Dump
    # version 2.5.6-RC1
    # http://www.phpmyadmin.net
    #
    # Host: localhost
    # Generation Time: Feb 09, 2004 at 04:50 PM
    # Server version: 4.0.15
    # PHP Version: 4.2.3
    #
    # Database : `lotto`
    #

    # --------------------------------------------------------

    #
    # Table structure for table `lotto`
    #

    CREATE TABLE `lotto` (
    `date` date NOT NULL default '0000-00-00',
    `ball1` tinyint(4) NOT NULL default '0',
    `ball2` tinyint(4) NOT NULL default '0',
    `ball3` tinyint(4) NOT NULL default '0',
    `ball4` tinyint(4) NOT NULL default '0',
    `ball5` tinyint(4) NOT NULL default '0',
    `ball6` tinyint(4) NOT NULL default '0',
    `bonus` tinyint(4) NOT NULL default '0',
    `ballset` tinyint(4) NOT NULL default '0',
    `machine` varchar(20) NOT NULL default '',
    KEY `date` (`date`)
    ) TYPE=MyISAM;


    Later :wink:
  • Posted: 11.01.2005, 06:28
     
    edfel
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    02.09.07
    Posts:
    831
    After browsing the web through Google, I think have the basic tools to make it. I have one question about the Admin Interface or Menu, any tip or code snipet re how to EDIT, ADD, or DELETE data from the DB and tables?

    TIA
  • Posted: 11.01.2005, 18:58
     
    sunadmn
    rank:
    Helper Helper
    registered:
     October 2004
    Status:
    offline
    last visit:
    01.03.06
    Posts:
    437
    I would suggest you take a look at the Example module that is shipped with the PN Core. Take that and modify it to your needs it has everything you will need for a basic module and is well written to include all the comments about each section and function so as to explain what is going on in each.


    -SUNADMN

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula