FW: [Malvern] Having a php nightmare

Renyk Devandre rdevandre at staff.wortech.ac.uk
Tue Aug 8 14:45:19 BST 2006


 
>From some guys at work,

Does this help or send more details

regards

 
 

Renyk Khyle de'Vandre'
Network Engineer
Worcester College Of Technology
IT Support
Phone: 01905 743577
Email: rdevandre at wortech.ac.uk

 
 

-----Original Message-----
From: Alastair Hole 
Sent: 08 August 2006 14:40
To: Edmund Haworth; Renyk Devandre
Subject: RE: [Malvern] Having a php nightmare

Ed: I'm guessing they have just omitted it as they are getting some
values.

Use:
print_r($row);

(outside the foreach) to find out what's really in the array and get
back to us...

A

-----Original Message-----
From: Edmund Haworth 
Sent: 08 August 2006 14:21
To: Renyk Devandre; Alastair Hole
Subject: RE: [Malvern] Having a php nightmare

They havn't actually told mysql_query who to talk to about that query,
ie no connection string.

-----Original Message-----
From: Renyk Devandre 
Sent: 08 August 2006 14:20
To: Edmund Haworth; Alastair Hole
Subject: FW: [Malvern] Having a php nightmare

Either of you have a clue to this one below? 


Renyk Khyle de'Vandre'
Network Engineer
Worcester College Of Technology
IT Support
Phone: 01905 743577
Email: rdevandre at wortech.ac.uk

 
 
-----Original Message-----
From: malvern-bounces at mailman.lug.org.uk
[mailto:malvern-bounces at mailman.lug.org.uk] On Behalf Of Cheryl Phillips
Sent: 08 August 2006 13:55
To: malvern at mailman.lug.org.uk
Subject: [Malvern] Having a php nightmare

Can anyone out there help before I throw something? 

we've got something along these lines

$sql = "SELECT branch_name FROM LOCATION";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
			
				
				foreach ($row as $branch)
				{
					echo $branch;
					
				}


-- I did have that in a while loop but things went a bit crazy! There is
also a bit of html echo'ed in there too as this is part of a form but
for claritys sake... anyway! 

At present there are only 2 values in the  database but it is repeating
the first value twice instead of giving me value 1 followed by value 2.
At once point it was giving me both of them in duplicate but that was
before I eradicated the while loop. I cant ever remember having this
issue before but it has probably been 2 years since I used foreach and I
seem to be completely lacking in brainpower lately!

Cheers in advance guys!

Cheryl


www.owenkyle.blogspot.com

_______________________________________________
Malvern mailing list
Malvern at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/malvern
-----------------------------------------------------------------------
This message is sent in confidence for the addressee only. It may contain confidential or sensitive information. The contents are not to be disclosed to anyone other than the addressee unless specific authorisation has been given by the sender. Unauthorised recipients are requested to preserve this confidentiality and to advise us of any errors in transmission. Thank you.
-----------------------------------------------------------------------



More information about the Malvern mailing list