Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 28th, 2006, 12:23 AM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default sql query i need

Hello guys ,

I need sql query to get the first field values without specifying the name of that field, i also don't want to use fetch_array,fetch_row like mysql concepts over here.
Anybody please provide me ASAP

 
Old July 28th, 2006, 12:25 AM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i need the result within today, atleast say it is possible or not.


 
Old July 29th, 2006, 02:27 AM
Authorized User
 
Join Date: Mar 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Seearam,
Write in detail about your prbolem. So that it will be easy for all to have atlest a sketch.

We WILL...
Best regards
Milind

 
Old July 29th, 2006, 08:57 AM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi guys,

I will give the explanation regarding sql query :

assume a table (user) having fields :
user_name,pass_word,ranking.
i need sql query to get the values of the user_name, without specifying user_name in the sql query.
like "select user_name from user"; this one i dont want , i need is there any query to get user_name values without specifying field name.

 
Old August 28th, 2006, 11:06 PM
Authorized User
 
Join Date: Mar 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to pritz Send a message via Yahoo to pritz
Default

Quote:
quote:Originally posted by seearam
 Hi guys,

I will give the explanation regarding sql query :

assume a table (user) having fields :
user_name,pass_word,ranking.
i need sql query to get the values of the user_name, without specifying user_name in the sql query.
like "select user_name from user"; this one i dont want , i need is there any query to get user_name values without specifying field name.

hi,

is it possible for you to user something like below
$sql="select * from user";
$res=mysql_query($sql)
$row=mysql_fetch_array($res);

and now u can fetch your values
echo $row[0]

hope it help if i got you correctly.
Regards

 
Old July 6th, 2007, 05:37 AM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i dont want php to retrive first feild, i need to specify it in query

 
Old November 20th, 2008, 03:11 AM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

SELECT column_name
FROM information_schema.columns
WHERE table_name = 'tablename'

 
Old November 30th, 2008, 03:14 AM
Authorized User
 
Join Date: Nov 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

select top(1) from table_name
returns one row






Similar Threads
Thread Thread Starter Forum Replies Last Post
sql query ldp101068 SQL Server 2000 7 December 18th, 2007 04:52 PM
Output Query to txt file from SQL Query everest SQL Server 2005 4 November 22nd, 2007 01:49 AM
SQL Query!! dpkbahuguna Beginning VB 6 5 October 12th, 2007 12:39 AM
Help with SQL query sattaluri Access 2 August 11th, 2006 09:26 AM
SQL query PinkyCat Classic ASP Databases 3 March 11th, 2005 01:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.