Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

display data without retrieve from database

 
Ikasari Widiyanto
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there any way that we can display data without retrieve from database?
For example,

if inside the database:
code description
cm_123 coffee 123
cm_124 coffee 124
te_234 tea 234
te_235 tea 235

then I want to add another column called type which consist of 2 types tea and coffee so that in the html:

code description type
cm_123 coffee 123 coffee
cm_124 coffee 124 coffee
te_234 tea 234 tea
te_235 tea 235 tea

so when the user add and update the type, we just display it. is there any way of doing this without connecting to database?
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can just substring the column code and get the "cm" or "te" as a string. match the strings and assign the values coffee, or tea respectively.
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!