473,395 Members | 1,631 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,395 software developers and data experts.

Where are my values?!

No - this isn't a morality question. :)

When I run this:
foreach ($this->RecordSet[0] as $x=>$y){
echo "<br>$x = $y";
}

I get this:
username = alpha
password = omega

But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
I know it's something symple with the sintax - but I just ain't seeing it.

What am I doing wrong?!
Jul 25 '07 #1
4 1120
..oO(Sanders Kaufman)
>No - this isn't a morality question. :)
There's not even a constructor ... SCNR ;)
>When I run this:
foreach ($this->RecordSet[0] as $x=>$y){
echo "<br>$x = $y";
}

I get this:
username = alpha
password = omega

But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
I know it's something symple with the sintax - but I just ain't seeing it.
Do you have error_reporting set to E_ALL? PHP should give you a notice.

$this->RecordSet
$this->Recordset

See the difference?

Micha
Jul 25 '07 #2
Sanders Kaufman wrote:
No - this isn't a morality question. :)

When I run this:
foreach ($this->RecordSet[0] as $x=>$y){
echo "<br>$x = $y";
}

I get this:
username = alpha
password = omega

But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
I know it's something symple with the sintax - but I just ain't seeing
it.

What am I doing wrong?!
Case sensitivity.

$this->RecordSet[0]

is not the same as

$this->Recordset[0]

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
Jul 25 '07 #3
Michael Fesser wrote:
.oO(Sanders Kaufman)
>No - this isn't a morality question. :)

There's not even a constructor ... SCNR ;)
>When I run this:
foreach ($this->RecordSet[0] as $x=>$y){
echo "<br>$x = $y";
}

I get this:
username = alpha
password = omega

But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
I know it's something symple with the sintax - but I just ain't seeing it.

Do you have error_reporting set to E_ALL? PHP should give you a notice.

$this->RecordSet
$this->Recordset

See the difference?
Oh, for crying out loud!
I knew it was something stupid.
Thanks.
Jul 25 '07 #4
Sanders Kaufman wrote:
But when I run this:
echo $this->Recordset[0]["username"]
echo $this->Recordset[0]["password"]

I don't get squat.
Are you sure the keys are exactly right? Sure it's not something like...

$this->Recordset[0]["username "]

??

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 35 days, 1:40.]

Cryptography Challenge
http://tobyinkster.co.uk/blog/2007/0...pto-challenge/
Jul 25 '07 #5

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

Similar topics

3
by: PipHans | last post by:
Hi, Consider this (light example): SELECT ., ., . FROM template LEFT JOIN Tvalues ON .=. This returns ok. But I have a clause on the Tvalues like this: WHERE .=1;
5
by: Rachel Weeden | last post by:
I'm working on an ASP Web application, and am having syntax issues in a WHERE statement I'm trying to write that uses the CInt Function on a field. Basically, I want to select records using...
3
by: Matik | last post by:
Hello all, I belive, my problem is probably very easy to solve, but still, I cannot find solution: declare @i int declare @z int create table bubusilala (
6
by: Andrea Williams | last post by:
Where is the best place to put global variables. In traditional ASP I used to put all of them into an include file and include it in every page. Will the Global.aspx.cs do that same thing? ...
4
by: Brian Shannon | last post by:
I have 3 combo boxes and two date text boxes on a .aspx page. The user can fill in any of the 5 controls or none to filter a datagrid. I was hoping someone could explain how to efficiently build...
6
by: Roy Gourgi | last post by:
Hi, I am trying to add a row to my table but I get the error message "invalid column name SOBN and BN1" on this statement. Basically, I am trying to add the row into the same table that I am...
1
by: colleen1980 | last post by:
There is a form where it ask the two dates and then run a query then report. Private Sub Command36_Click() DoCmd.OpenQuery "qryResultsReport" DoCmd.OpenReport "rpt_TopTen", acPreview, "", ""...
4
by: saniac | last post by:
I am working on a little project using pysqlite. It's going to be exposed on the web, so I want to make sure I quote all incoming data correctly. However, I've run into a brick wall trying to use...
8
by: chrisdavis | last post by:
I'm trying to filter by query or put those values in a distinct query in a where clause in some sort of list that it goes through but NOT at the same time. Example: ROW1 ROW2 ROW3 ROW4 ,...
3
markmcgookin
by: markmcgookin | last post by:
Hi Folks, I have a VB app, and I have been working at it for a while, and I am now at the stage where I want to create a search function. Now don't be scared! It is in the .Net compact framework,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.