Jump to content

How to get the first value of a SQL records in HTML


hemin47

Recommended Posts

Hi,

I am new in this..

I try to extract the first digit from sql data. and based on the value of that I would like to change the css class name.

In this HTML scrip Ihave this :

<tr> <td align="right" class="emailTitle"> Severity:</td> <td class="1">

%PRQ.FAULTS.SEVERITY%</td> </tr>

I get the severity and this is like this : 1 - MAJOR, 2 - ALERT....

I can not use the value because of the space in between now I want to use the ferst digit to used as a class name.

How to extract the first digit only in HTML? = (1)

Or only the name without the extra digit the space and "-"?= (MAJOR)

I tried left function like this %Select Left(PRQ.FAULTS.SEVERITY,1)% but this is wrong.

 

Can someone help?

 

Thnak you.

Edited by hemin47
Link to comment
Share on other sites

Please post a link to whatever information source is giving you these crazy ideas. HTML is a markup language. There is no such thing as an "HTML script." Accessing a database requires a server-side scripting language.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...