Question : php how can I put one fill more in this code

echo 'ST="' . $row['ST'] . '" ';    in case is 'ST' > 100 then  it  print      a  

if 'ST' < 100 and 'ST' > 80 then  print  b     if 'ST' < 80 print C



Thank


// Select all the rows in the markers table
mysql_db_query($database,"SET NAMES utf8");
$query = "SELECT * FROM markers WHERE 1";
$result = mysql_query($query);
if (!$result) {
  die('Invalid query: ' . mysql_error());
}

header("Content-type: text/xml");

// Start XML file, echo parent node
echo '<markers>';

// Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
  // ADD TO XML DOCUMENT NODE
  echo '<marker ';
  echo 'name="' . parseToXML($row['name']) . '" ';
  echo 'address="' . parseToXML($row['address']) . '" ';
  echo 'lat="' . $row['lat'] . '" ';
  echo 'lng="' . $row['lng'] . '" ';
  echo 'ST="' . $row['ST'] . '" ';
  echo 'picname="' . $row['picname'] . '" ';
  echo '/>';
}

Answer : php how can I put one fill more in this code

Then just build a temporary table that holds ALL the names in a single field, along with an address:

Currentdb.Execute "Select Address, csz INTO YourTempTable FROM Select Distinct Address, csz FROM YourExistingTable"

Now add a SendTo field:

Currentdb.Execute "ALTER TABLE YourTempTable ADD COLUMN SendTo TEXT(255)"

Now build a recordset where you can loop through all names for a specific Address + csz, and concatenate the names:

Dim rst As DAO.Recordset
Dim rstNames as DAO.Recordset
Dim sNames as String

set rst = Currentdb.OpenRecordset("SELECT * FROM YourTempTable")

Do Until rst.EOF
  Set rstNames = Currentdb.Openrecordset("SELECT * FROM YourExistingTable WHERE [Address]='" & rst("Address") & "' AND csz='" & rst("csz") & "')"
  sNames = ""
  Do until rstNames.EOF
    sNames = sNames & vbCrLf & rstNames("First_Name") & " " & rstNames("Last_Name")
    rstNames.movenext
  Loop
  rst.Edit
  rst("SendTo") = sNames
  rst.Update
Loop
Random Solutions  
 
programming4us programming4us