954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Using views

I have a program that I want to use a view with. The code I'm using is:
$v="select * from peoplecontact".$where." order by ci_city";
The select statement seems to work fine. It returns the correct number of rows. Now, how to I use it (see $entername)?

$v="select * from peoplecontact".$where." order by ci_city";
 $num_rows = mysql_affected_rows();
 $entername=$v['PD_Lname']."  ".$v['PD_Fname'];  //doesn't work

mysql_fetch_array($v) doesn't work either.

Can anyone help with this?
TIA,
Dick Deeds

DickDeeds
Newbie Poster
3 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

i dont understand what u are trying to do
if u wanted to use mysql_fetch_array u would need something liek

$result=mysql_query($v); 
while($row=mysql_fetch_array($result)){ // Start looping table row
echo $row[columnname];}
SKANK!!!!!
Posting Pro in Training
429 posts since Apr 2009
Reputation Points: 15
Solved Threads: 7
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You