RE: Help a newbie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ankit,
	what you _may_ be looking for is :-

echo $ratesheetid;
echo $ratesheetname;

If you're problem is more complicated than that, let me know the exact error
you get.

By the way, if you haven't already installed it, you should download and
install phpMyAdmin. It's very simple to set up, and will make it very easy to
manage your MySQL databases.

Rob.


-----Original Message-----
From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On
Behalf Of ankit.mathur82
Sent: 01 March 2007 05:04
To: php-objects@xxxxxxxxxxxxxxx
Subject:  Help a newbie

Hi friends,

I'm beginning to learn php.

While doing so I was now in the process of connecting my pages to MS SQL &
retrieve data & display it to the user.

However, I'm as of now stuck with a simple select query itself.

While the query is being processed I'm unable to store it in a array n
display the result on screen.

Here's the part of the page I've developed -------

<?php

include("conn.php");

$sql="select ratesheetid, ratesheetname from usr_ratesheet";

$result=mssql_query($sql) or die("ERROR IN Executing Query");

$num=mssql_num_rows($result);

$arr=mssql_fetch_array($result,MSSQL_ASSOC)or die("ERROR IN Getting Data");

$ratesheetid=$arr['RateSheetId'];
$ratesheetname=$arr['RateSheetName'];
?>

Here conn.php contains all my database connection info & is working perfectly
fine. So the connection is established & query processed.

I just want to know the code to display the result on screen.

Thanks everybody in advance for helping me out & I would appreciate if you
could reply back to me at the earliest as then I'd be able to move forward in
my quest to learn this wonderful language & use it in my work.

Thanks again
Ankit Mathur






------------------------ Yahoo! Groups Sponsor --------------------~--> Check
out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/4It09A/fOaOAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator http://www.metastorage.net/
Yahoo! Groups Links




***********************************************************************************
Any opinions expressed in email are those of the individual and not necessarily those of the company. This email and any files transmitted with it are confidential and solely for the use of the intended recipient 
or entity to who they are addressed. It may contain material protected by attorney-client privilege. If you are not the intended recipient, or a person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.

Random House Group + 44 (0) 20 7840 8400
http://www.randomhouse.co.uk
http://www.booksattransworld.co.uk 
http://www.kidsatrandomhouse.co.uk
Generic email address - enquiries@xxxxxxxxxxxxxxxxx

Name & Registered Office:
THE RANDOM HOUSE GROUP LIMITED
20 VAUXHALL BRIDGE ROAD
LONDON
SW1V 2SA
Random House Group Ltd is registered in the United Kingdom with company No. 00954009, VAT number 102838980
***********************************************************************************


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux