1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Get a percentage between 2 mysql fields

Discussion in 'MySQL' started by pnaidoo, Mar 8, 2013.

  1. #1
    Hi everyone

    Can someone help me with the correct php script to display the percentage between 2 mysql database fields?

    My database has two fields: Provider and Completed

    The script should check the number of rows for the provider and show the percentage where the Completed field is 0.

    Thanks for your help
     
    pnaidoo, Mar 8, 2013 IP
  2. cahya77

    cahya77 Member

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    select count(Provider), Provider*0.01 from DB where Completed = 0
     
    cahya77, Mar 8, 2013 IP