473,625 Members | 2,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fetch a column

hi all,

Is it possible to fetch a column from a queryresult?

kind regards
Stijn
Jul 17 '05 #1
3 2656
On Sat, 27 Sep 2003 14:59:01 +0200, Stijn Goris wrote:
hi all,

Is it possible to fetch a column from a queryresult?

kind regards
Stijn

$sql = "
SELECT column_name
FROM database.table
";
HTH =)

Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
Programming, Web design, development & hosting.

Jul 17 '05 #2
On Sat, 27 Sep 2003 13:59:01 +0200, "Stijn Goris" <me*****@hotmai l.com> wrote:
Is it possible to fetch a column from a queryresult?


You'll have to be a bit more specific on what a 'queryresult' is.

(i.e. Assuming you're talking about a database query, the answer depends on
which database and interface you're using).

--
Andy Hassall (an**@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #3

"Ian.H" <ia*@WINDOZEdig iserv.net> wrote in message
news:pa******** *************** *****@hybris.di giserv.net...
On Sat, 27 Sep 2003 14:59:01 +0200, Stijn Goris wrote:
hi all,

Is it possible to fetch a column from a queryresult?

kind regards
Stijn

$sql = "
SELECT column_name
FROM database.table
";
HTH =)

Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
Programming, Web design, development & hosting.


Indeed, too dimple to be true... Thanks
Jul 17 '05 #4

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

Similar topics

1
8641
by: Agoston Bejo | last post by:
The problem is as follows: I have a stored proc. that returns a types.ref_cursor (where types.ref_cursor is defined as 'ref cursor'): PROCEDURE P(c OUT TYPES.ref_cursor); The returned cursor has a bunch of columns, but I only need a few of them. Anyway, with FETCH INTO I have to provide variables for every column. So I have to do this: var1 Type1; var2 Type2; ...
2
1603
by: Joakim Olesen | last post by:
Hi I have a table with a BLOB column which contains bmp images. I'm unsuccessfully trying to fetch one of these images and saving it as a file. The result is a file with a size of 12Kb, but it's not a valid BMP file (I can't view it in an image viewer). The image I try to fetch is quite small though, so the size (12Kb) is sensible. I've pasted my code below (and it doesn't throw any exception): using System;
2
1166
by: DeWitt Phillips | last post by:
First let me say thank you. I am trying to extract the last value entered into a database column without having to read through every value stored in the column. Is that something that is easy to do?
20
929
by: Abhishek | last post by:
can anybody tell how to fetch image from database(access) to the visual basic picture box control. the code i have been using is as below but it gives me invalid paramter error.... Dim connection As New OleDb.OleDbConnection() Dim cmd As New OleDb.OleDbCommand() cmd.CommandText = "select ID,Name,Description,Image from MASTER where ID like '" & Trim(cmbID.Text) & "'" cmd.Connection = connection Dim myReader As OleDb.OleDbDataReader
4
2845
by: db2admin | last post by:
hi, For the following SQL and plan ============================================================== SELECT Q1.PLCY_KY, Q1.PLCY_TRM_EFCTV_DT, Q1.ACNTG_BGN_DT, CASE WHEN ((Q1.PLCY_SRC_CD = '02') AND ((DAYS(Q1.PLCY_TRM_EXPRTN_DT) - DAYS(Q1.PLCY_TRM_EFCTV_DT)) <= 180)) THEN 'Y'
5
1837
by: cdtsly | last post by:
Hi i have a table with all value at 4 i select all lines in a fetch i update one with a value of 7 i update all the row in the fetch with a value 5 the result is that all my row are at 5 and the only line which should be at 7 is at 5 too. i see that the problem is at the first mysql_db_query, and i don t know
0
4312
by: padmaneha | last post by:
Hi Thanks for your response but the query which you gave in my previous post doesnt work. It displays the same cnt for movie reviews and videoreviews Let me explain you in detail As I said I have got two tables like one is 'Food table' and the other one is the 'Videos' table Columns which I have created in 'Food' table are 'foodid' and 'blogcid' colcumns which I have created in Videos table are 'videoid, 'destid', 'videotitle'
3
27506
Soniad
by: Soniad | last post by:
Hello, In stored procedure, i am using query that fetches 2 columns record but single row. i have used cursor to fetch single record. is there any way to fetch the record and put it in variable declared without using cursor , or any syntax . As cursor is better to fetch multiple records, but here record fetched is single row record, but the problem i am facing is how to put this value in variable. if there was a single column then it is...
0
1973
by: CatchSandeepVaid | last post by:
Product and ProductBasic has one-to-one relationship Product ---> ProductID <<PK>> ProductBasic ----> ProductId, useCode, StartTime as composite key..... this startTime's value will be known as runtime. Now i want to define mapping between Product & ProductBasic, how will i do it ? Moreover suppose i define their mapping as product.productID = productBasic.productID and useCode='a' as :
0
8182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8688
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8494
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6115
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2614
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.