p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   MySQL (http://p2p.wrox.com/forumdisplay.php?f=99)
-   -   sql query i need (http://p2p.wrox.com/showthread.php?t=45807)

seearam July 28th, 2006 12:23 AM

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


seearam July 28th, 2006 12:25 AM

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



milind.paralkar July 29th, 2006 02:27 AM

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


seearam July 29th, 2006 08:57 AM

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.


pritz August 28th, 2006 11:06 PM

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


seearam July 6th, 2007 05:37 AM

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


seearam November 20th, 2008 03:11 AM

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


ms_kout November 30th, 2008 03:14 AM

select top(1) from table_name
returns one row



All times are GMT -4. The time now is 12:58 PM.

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