I am trying to get a variable to display, when used as part of a value inside of a mysql table.
To explain my problem, i am going to use a simple example my script would contain something like this:
$variable = 'cool';
The value inside of the mysql field would be something like this:
This is '.$variable.' wow
When i echo this value, it displays as:
This is '.$variable.' wow
I want it to display as:
This is cool wow
Here are the two queries i am working with:
$linkQuery3 = 'SELECT model FROM models WHERE model_id = "'.$pageModel.'"
';
$sql15 = mysql_query($linkQuery3) or die(mysql_error());
if (mysql_num_rows($sql15) == 0) {
die('No model results.');
} else {
while($row = mysql_fetch_assoc($sql15)) {
$model = ($row['model']);
}
}
$linkQuery2 = 'SELECT l.link , l.desc , l.domId , d.domain
FROM links l
INNER JOIN domains d
ON d.domId = l.domId
WHERE l.catId="'.$pageCat.'" && (l.modId="1" || l.modId="'.$pageModel.'")
ORDER BY domain
';
$sql3 = mysql_query($linkQuery2) or die(mysql_error());
if (mysql_num_rows($sql3) == 0) {
die('No link results.');
} else {
$pageContent .= '';
while($row = mysql_fetch_assoc($sql3)) {
$linkAd = stripslashes($row['link']);
$linkDesc = ($row['desc']);
$linkDomain = ($row['domain']);
$pageContent .= '
<li><a href="'.$linkAd.'" target="_tab">'.$linkDesc.' '.$linkDomain.'</a></li>
';
}
}
Basically, I want to use
$model
as part of the value inside of the desc field. When
$linkDesc
is echoed, this will be part of the outcome when
$pageContent
is echoed. It should display the text along with the value of
$model
, not just display
'.$model.'
As it currently does...
To view an example of this, you can check out http://www.free4blackberry.com/downloads/9800/apps.php it is one of my pages on my website, near the bottom of the page, you will see a list of links. The 7th one from the bottom links to en.softonic as
$linkDomain
If you read the text of the link you will clearly see my problem.
What am i missing here guys?