Jump to content

Select Where Echo


barryflood22

Recommended Posts

I cant get this script to work, anybody have any ideas?

 


<?php
//ECHO LOCATION
echo '<p><b>Location: </b>';
// get area details
$query2="select * from jos_RAM_areas WHERE id = '".$row['area']."' ";

$sth2=mysql_query($query2);




$Location=$sth2['fullname'];

$Area = "$Location";



echo $Area;
$town_city = $row['town_city'];
if ($town_city!='') { echo "\n\n$town_city"; }




?>

Edited by barryflood22
Link to comment
Share on other sites

$sth2=mysql_query($query2);

$Location=$sth2['fullname'];

If "not working' means "PHP throws a serious warning about this line being wrong," then you're not calling the appropriate fetch function on your result.

 

If "not working" means "no errors, I just don't know what's happening," turn errors on, then see sentence #1.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.