When a php statement is part of a markup snippet in a mysql database
table field, what must be done to have the php parse in the html document.
A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php
Louise
Hi,
Your problem is that your variables $Lat1,$Lat2,$Lon1,$Lon2 all reffer
to resultsets and not the Latitudes or Longitudes.
Try something like this:
$res = mysql_query(
SELECT ZG_LATITUDE, ZG-LONGITUDE FROM zip_code where
zg_zipcode = '$zip');
List($Lat,$Lon) =
When a php statement is part of a markup snippet in a mysql database
table field, what must be done to have the php parse in the html
A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php
Louise
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe,
try eval (http://ca3.php.net/manual/en/function.eval.php)
Bastien
From: boclair [EMAIL PROTECTED]
To: php-db@lists.php.net php-db@lists.php.net
Subject: [PHP-DB] Parsing PHP sourced from blob Date: Mon, 18 Apr 2005
17:52:52 +1000
When a php statement is part of a markup snippet in a mysql
There are two places you can figure out the average: in MySQL or in
PHP. Then you want to sort the results by this Average: in MySql use
ORDER BY and in php use array_multisort
in MySQL your SQL might look like:
SELECT TEAM, PLAYED, WIN, LOSS, DRAW, POINTS, POINTS / PLAYED as
AVERAGE
Ok, I tried what you saidHere's the code:
$res = mysql_query(
SELECT ZG_LATITUDE, ZG_LONGITUDE FROM zip_code where
zg_zipcode = '$zip');
List($Lat,$Lon) = mysql_fetch_row($res);
$Lat1 = ($Lat-2);
$Lat2= ($Lat+2);
$Lon1= ($Lon-2);
$Lon2= ($Lon+2);
//echo ($Lat1);
//echo ($Lat2);
Hello,
I need your help about PHP (ver 4.3.1) and MySQL (ver 3.23) database.
I am struggling to customise a database (using left command etc), and am
stuck now.
Please have a brief look at my scripts below.
What I do like to do is to get first 3 letters from "loc1" column from