Results 1 to 2 of 2

Thread: PHP mysql - Help/Idea's

  1. #1
    Join Date
    May 2010
    Location
    Sacramento, CA
    Posts
    91
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default PHP mysql - Help/Idea's

    I am trying to build a php site to build a weekly schedule for my employee's and i'm running out of ways to do it.

    I have these tables:

    -employee
    -location
    -shift


    each table has an 'id' so i can call on employee's and location's with an $id variable.

    I am thinking I will make a page to add 'shifts' and that page will insert the 'employee' and the 'location' into a row on the 'shift' table with the date and time.

    Where I could use some help/idea's is creating the page to view a calendar, then be able click on a week(goes to new page) and view the scheduled shifts.
    I'm not sure how to do a few things this would require:

    1)call on date's appropriate to the month/year/day of week
    2)only put shifts in the column that match the date at the top of the column

    here's what i'm thinking for a format:

    <table border="1" cellpadding="0">
    <tr>
    <td width="75">&nbsp;</td>
    <td >11MAY10</td>
    <td >12MAY10</td>
    <td >13MAY10</td>
    <td >14MAY10</td>
    <td >15MAY10</td>
    <td >16MAY10</td>
    <td >16MAY10</td>
    </tr>

    <tr>

    <td><strong>location</strong></td>
    <td><p><strong>shift:<br />
    -</strong>employee<br />
    -time
    </p>
    <p><strong>shift:<br />
    -</strong>employee<br />
    -time </p></td>
    <td><strong>shift:<br />
    -</strong>employee<br />
    -time </td>
    <td><strong>shift:<br />
    -</strong>employee<br />
    -time </td>
    <td><p><strong>shift:<br />
    -</strong>employee<br />
    -time </p>
    <p><strong>shift:<br />
    -</strong>employee<br />
    -time </p></td>
    <td><strong>shift:<br />
    -</strong>employee<br />
    -time </td>
    <td><strong>shift:<br />
    -</strong>employee<br />
    -time </td>
    <td><p><strong>shift:<br />
    -</strong>employee<br />
    -time </p>
    <p><strong>shift:<br />
    -</strong>employee<br />
    -time </p></td>

    </tr>
    </table>[/COLOR]

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Going through the tutorials at http://php-mysql-tutorial.com should help clear this up. There are a lot of variables/problems in what you're talking about above and by clearing up some of them with those tutorials you can focus on what is really confusing you, and we can help. It may be easier to start with a smaller practice site/database to get a feel for working with mysql. What you're doing isn't particularly hard, but it's on a larger scale than what I'd recommend for a first project.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •