473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

storing sub script and superscript value in Mysql database

Hi all,

i need to store data having subscript and super script like chemical equations symbols...values in to mysql database and fetch it and display.

for that i need to convert that text into some image and store the link of that image in the database,but not getting how to do that.

am i thinking right or is there is any other alternative method for that plz let me knw...
its urgent
May 2 '08 #1
3 9672
ronverdonk
4,258 Expert 4TB
If you just want to use superscript and subscript you can use the <sub> and <sup> tags of HTML to display, no images needed. See this sample (nonsense but it shows my meaning). When you display this it will show the sub- and superscripts you need.
Expand|Select|Wrap|Line Numbers
  1. Chemical formulas include H<SUB>2</SUB>O (water) and C<SUB>21</SUB>H<SUB>27</sub>NO (methadone).<br>
  2. Let <VAR>x</VAR> = <VAR>x<SUP>1</SUP></VAR> + <VAR>x<SUP>2</SUP></VAR> + ... + <VAR>x<SUP>n</SUP></VAR>. 
Or are you looking for something else?

Ronald
May 2 '08 #2
If you just want to use superscript and subscript you can use the <sub> and <sup> tags of HTML to display, no images needed. See this sample (nonsense but it shows my meaning). When you display this it will show the sub- and superscripts you need.
Expand|Select|Wrap|Line Numbers
  1. Chemical formulas include H<SUB>2</SUB>O (water) and C<SUB>21</SUB>H<SUB>27</sub>NO (methadone).<br>
  2. Let <VAR>x</VAR> = <VAR>x<SUP>1</SUP></VAR> + <VAR>x<SUP>2</SUP></VAR> + ... + <VAR>x<SUP>n</SUP></VAR>. 
Or are you looking for something else?

Ronald
Thanks for the reply sir...

i dont know like i am going to use HTML for my front end...
n one more thing is if i use html..then also i may need to display the chemical structure n all for that...so i think its compulsory for me to store that as an image only..and retrive the path of that image...
so plz let me knw how to solve it..
May 5 '08 #3
ronverdonk
4,258 Expert 4TB
You will have to code your equations, formulaes, etc. and show them on the screen.

Then there are are 3 ways to tackle this and you won't like any of them:
  • Use a screen grabber to make an image of that part of the screen and save it (all manually).
  • Use a professional package, but those are very expensive.
  • Using PHP the only way you can take a screenshot of a webpage is to render the page : you must parse the HTML, CSS and Javascript to generate the same picture that a browser show. And there is nothing written in PHP that can do that, this is a very complex task : internet explorer doesn't even manage to properly render CSS 2)
Ronald
May 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tom | last post by:
Hi, I'm designing a website that will use XML to store all the content of my web pages. I will use a PHP script to parse the XML. Should I store the XML in a MySQL database or should I simply...
3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
3
by: jkugler | last post by:
Hello, I am trying to store huge amounts of data from xml files and put them into a MySQL database. The xml files all are in this format: <?xml version="1.0" encoding="UTF-8"?>...
0
by: Larry Neylon | last post by:
Hi there, I'm currently trying to implement a website that will store and retrieve Polish, so I need to be able to handle Polish characters using classic ASP with MySql5. Does anybody have an...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
14
by: mistral | last post by:
Need php script to create mySQL database programmatically; since hosting configuration may not allow create database from script, script also need eliminate/rewrite all restrictions in appropriate...
7
by: Mike | last post by:
I have developed an application, for psyc patients.... they type in very personal information in a web form to help them work through problems in their lives. Once they enter the info, I encrypt...
3
tolkienarda
by: tolkienarda | last post by:
hi all i have a problem i have a script that i got working exactly the way i wanted it. and then i tried to intrigate it into the site and it totaly stopped working. below is the original code ...
0
samycbe
by: samycbe | last post by:
Hi, I have a value in sql database as 0c. but i want to display that for the user report in a flexgrid with (0c - 0 only) superscript and subscript. like that m3 also 3 should come in a...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.