Jump to content

justravis

Members
  • Posts

    115
  • Joined

  • Last visited

Posts posted by justravis

  1. i'm just moving to a new host...the 1 i hav could never figure out how to make phps files display properly like these:

    http://www.bloggingpro.com/themes/header.phps

    http://progphp.com/progress.phps

     

    now i'm having the same problem at the new host...they either display like php files or ask me if i want to download the file because it doesnt recognize the type...the phps file type is defined in cpanel...what am i or my webhosting company doing wrong?

  2. i hav 2 selectboxes for month & yr.

     

    [php:1:7dde7365b6]<?php

    $grad_date= \"$grad_yr-$grad_mo-00\";

     

    $studquery=\"INSERT INTO student (`first`, `last`, `nick`, `ss`, `pass`, `phone`, `email`, `emph_id`, `units_left`, `grad_date`) values (\'$first\', \'$last\', \'$nick\', \'$ss\', \'$pass\', \'$phone\', \'$email\', \'$emphasis\', \'$units_left\', \'$grad_date\')\";

     

    ?>[/php:1:7dde7365b6]

     

    All the other fields insert except the grad_date just ends up 0000-00-00.

     

    ANY IDEAS WOULD BE GREATLY APPRECIATED!!!!

  3. I\'m creating a financial db that includes the tracking of commissions paid out & discounts given.

     

    Referrals of clients will most likely be clients themselves. That is why the referrals table has 2 fields that are foreign keys from the org table. How would you track commissions paid? Just add a field to transaction table or create a new table?

     

    As far as discounts given, clients are given a percentage that will be discounted until thier total discount is met. Is my implementation adequete?

     

    organization

    a) id

    B) name

    c) web

     

    contact

    a) id

    B) org_id

    c) name

    d) phone

    e) email

    j) username

    k) password

     

    service

    a) id

    B) name

     

    org-serv

    a) id

    B) org_id

    c) serv_id

    d) frequency

    0 (one-time)

    1 (annually)

    4 (quarterly)

    12 (monthly)

    e) pres_cost

    f) beg_date

    g) end_date (stops billing, but yet records past subscriptions)

     

    Discount

    a) Id

    B) org_id

    c) percent

    d) cum_disc

    e) tot_disc

     

    transaction

    a) id

    B) o-s_id

    c) date

    d) cost

    e) discount

    f) amt_paid

     

    referral

    a) id

    B) referrer (org_id)

    c) client (org_id)

    d) comm_rate

     

    I APPRECIATE ANY ASSISTANCE.

  4. I\'m confused on how to create a db that tracks recuring and one time charges. Just dont know where one time charges fits in the puzzle. Any help would be greatly appreciated.

     

    Clients will be charged different prices for the same service. If prices go up, I want the db to still store fees paid in the past. That is why I did not combine the Subscrible & Transaction tables.

     

    Heres is the structure thus far:

     

    Organization

    a) Id

    B) name

     

    Contact

    a) Id

    B) Org_id

    c) Name

    d) Phone

    e) Email

    f) Address

    g) City

    h) State

    i) zip

     

    mop (method of payment)

    a) id

    B) org_id

    c) card_nbr

    d) exp_date

    e) verification_nbr

     

    Service

    a) Id

    B) name

     

    Subscribe

    a) Id

    B) Inactive

    c) Org_ID

    d) Serv_ID

    e) cost

     

    Transaction

    a) id

    B) Subscribe_id

    c) date

  5. I have a table of years and numbers that refer to seasons in another table.

     

    It looks something like this:

    yr number

    2002 2

    2003 1

     

    I need to create a query that selects the latest yrnumber COMBO. In this case, it would be 2003, 1.

     

    Here is what I have tried:

     

    SELECT MAX(yr), MAX(number) FROM issue

    returned 2003, 2

     

    SELECT MAX(yr), MAX(number) FROM issue WHERE yr=MAX(yr)

     

    SELECT yr, number FROM issue WHERE yr=MAX(yr) AND number=MAX(number)

     

    Both returned error \"Invalid use of group function\"

     

    Any other ideas? I know mysql does not support sub-queries, so do I have to use two?

     

    Sorry to bug you on a seemingly trivial issue, but I TRY to always learn how to do things the in the best and most efficient manner.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.