Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6025565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:19:08+00:00 2026-05-23T04:19:08+00:00

I have a column in mssql table that holds numbers 1 thru 101. Using

  • 0

I have a column in mssql table that holds numbers 1 thru 101. Using this While and if else if statement works fine. I need to add the ability to get a grey image for 101. This requires the else if statement for the yellow image to be modified but cannot get it to work. Please inspect the lower example amd let me know where I went wrong. Thanks.

WORKS:

while ($row8 = mssql_fetch_array($result8)) {
if ($row8['IPscore'] > 85) {        // Get Green image
  $row8['ScoreIND'] = $Good;
  }
else if ($row8['IPscore'] < 69) {   // Get Red image
  $row8['ScoreIND'] = $Bad;
  }
else {
  $row8['ScoreIND'] = $Fair;        // Get Yellow image
  }

FAILS:

if ($row8['IPscore'] > 85) {       // Get Green image
  $row8['ScoreIND'] = $Good;
  }
else if ($row8['IPscore'] < 69) {  // Get Red image
  $row8['ScoreIND'] = $Bad;
  }
else if  ($row8['IPscore'] (>70 and <84)) {  // Get Yellow image
  $row8['ScoreIND'] = $Fair;
  }
else ($row8['IPscore'] == 101) {    // Get Grey image
  $row8['ScoreIND'] = $LowVol;
  }

GETTING ERROR: unexpected ‘>’, expecting ‘)’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:19:08+00:00Added an answer on May 23, 2026 at 4:19 am
    else if  ($row8['IPscore'] (>70 and <84)) { 
    

    change with;

    else if  ( $row8['IPscore'] > 70 and $row8['IPscore'] < 84 ) {  
    

    Edit:
    Also There is logically error. Check IPscores greater to smaller.

    if($row8['IPscore'] == 101) {    // Get Grey image
      $row['ScoreIND'] = $LowVol;
    }else if ($row8['IPscore'] > 85) {       // Get Green image
      $row8['ScoreIND'] = $Good;
    }else if  ( $row8['IPscore'] > 70 and $row8['IPscore'] < 84  ) {  // Get Yellow image
      $row8['ScoreIND'] = $Fair;
    }else if ($row8['IPscore'] < 69) {  // Get Red image
      $row8['ScoreIND'] = $Bad;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have an MSSQL table with two columns: an int ID column that's
I have a table that has a column which holds the id of a
I have mysql table that has a column that stores xml as a string.
Lets say I have a table in MySQL called articles, that has a column
I have a user table in my mysql database that has a password column.
I have a table that has the following columns: GRVLID GRID Timein Timeout This
I have an MSSQL 2000 table that has a lot of duplicate entries. Each
I have a table that contains a Date column in varchar format. The date
I have a mysql table , which holds data like this. Name |how_out |runs
I currently have a table with a column as varchar . This column can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.