hemin47 Posted August 11, 2014 Share Posted August 11, 2014 (edited) 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 August 11, 2014 by hemin47 Link to comment Share on other sites More sharing options...
niche Posted August 11, 2014 Share Posted August 11, 2014 You'll need php for that or the equivalent . Link to comment Share on other sites More sharing options...
hemin47 Posted August 12, 2014 Author Share Posted August 12, 2014 Thank you, but I need a SQL command in HTML script for this. Link to comment Share on other sites More sharing options...
davej Posted August 12, 2014 Share Posted August 12, 2014 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 More sharing options...
Ingolme Posted August 12, 2014 Share Posted August 12, 2014 This looks like it's a template language. For information about it you will have to ask the company or group that provided it to you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now