473,407 Members | 2,315 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,407 software developers and data experts.

how to display a text in a SELECT ?

Hi

It's probably a stupid question, but I can't find how to do that in
the MySQL documentation ...

I want to do the following query, or something like that:

SELECT id, "string"+id as text FROM ...

and the result should be:

id text
1 string1
2 string2
3 string3
... . ... for each id returned by the query

It looks stupid but I can't figure which operator (I tried '+', '.',
'|', '&') I can use for this purpose

Thanks for your help
krystoffff
Jul 19 '05 #1
3 2073
Try This:

SELECT id, CONCAT('string',id) as text FROM......

"krystoffff" <pr******@silesky.com> wrote in message
news:85**************************@posting.google.c om...
Hi

It's probably a stupid question, but I can't find how to do that in
the MySQL documentation ...

I want to do the following query, or something like that:

SELECT id, "string"+id as text FROM ...

and the result should be:

id text
1 string1
2 string2
3 string3
... . ... for each id returned by the query

It looks stupid but I can't figure which operator (I tried '+', '.',
'|', '&') I can use for this purpose

Thanks for your help
krystoffff

Jul 19 '05 #2
Try This:

SELECT id, CONCAT('string',id) as text FROM......

"krystoffff" <pr******@silesky.com> wrote in message
news:85**************************@posting.google.c om...
Hi

It's probably a stupid question, but I can't find how to do that in
the MySQL documentation ...

I want to do the following query, or something like that:

SELECT id, "string"+id as text FROM ...

and the result should be:

id text
1 string1
2 string2
3 string3
... . ... for each id returned by the query

It looks stupid but I can't figure which operator (I tried '+', '.',
'|', '&') I can use for this purpose

Thanks for your help
krystoffff

Jul 19 '05 #3
Try This:

SELECT id, CONCAT('string',id) as text FROM......

"krystoffff" <pr******@silesky.com> wrote in message
news:85**************************@posting.google.c om...
Hi

It's probably a stupid question, but I can't find how to do that in
the MySQL documentation ...

I want to do the following query, or something like that:

SELECT id, "string"+id as text FROM ...

and the result should be:

id text
1 string1
2 string2
3 string3
... . ... for each id returned by the query

It looks stupid but I can't figure which operator (I tried '+', '.',
'|', '&') I can use for this purpose

Thanks for your help
krystoffff

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: dmiller23462 | last post by:
I'm trying to create a submission page for users to request PC/LAN Access....If they select "Yes" in the field asking about if they need Non Standard Software, I want several other HTML fields to...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
4
by: Keith | last post by:
Hello - this started out as a minor annoyance - and now is starting to bother me more and more - I'm hoping someone can help me. I would like to have a combobox display - NOT initially be blank...
4
by: cathy | last post by:
Hi All, I am having problems displaying content relevant to the option selected in a drop-down menu. I have an xml document which is running content through Flash and I need to have the same...
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,...
2
by: mervyntracy | last post by:
Hi There, I have recently started coding in asp.net (just 2 and a half days now). I am writing a simple test app that gets data from a data base and displays the value perfectly in the drop down...
1
by: Bobc003 | last post by:
Hi, I'd like to put a double drop-down menu on my webpage and instead of a redirection to a new webpage, I'd like to display the result in a new section. I'm kind of stuck and I only have a triple...
1
by: fsalvador | last post by:
Hi, I need help with this. I am trying to figure it out but I can't. I have 2 pages. I would like to display in the second page the content of one class and hide the content of the other...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
10
by: dkyadav80 | last post by:
<html> /// here what shoud be java script for: ->when script run then not display all input text field only display selection field. ->when user select other value for institute only this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.