SunQuest
 
           MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 12th, 2003, 01:34 AM
klausre klausre is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Norway
Posts: 14 klausre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry Get something from MySQL- problem-

Hi!
I’m now customizing a script to my needs, and most of it is easy to do, but I have problems whit some things that I like to have some guides or help whit.

I'm trying to make a link to my forum board whit a gif-image if I have entered a link to a related discussion. The script takes and displays the article if there is an article in the db.

I have marked the original script in red and my customizing inn blue.

It does not give any error, but the link is not being displayed. Does anyone now what I have made wrong.
if(is_numeric($articleId))
{
$aResult = mysql_query("select apTitle, apContent from tbl_ArticlePages where apArticleId = '$articleId' order by pk_apId asc limit " . ($page-1) . ", 1");

if($aRow = mysql_fetch_array($aResult))
{
// Display the details of this article
DisplayArticleHeader($articleId, false, BIG_BLACK_TITLE);

echo "<hr width='96%'>";

// Show the ratings bar
ShowRatingBar($articleId);

// Update the numer of times that this article has been shown
if($page == 1)
UpdateViews($articleId);

echo "<div align='right'><br>";


$forumlink = mysql_query("select aForumLink from tbl_Articles where pk_aId = '$ArticleId'");
if($flink = mysql_fetch_array($forumlink))
{
if($flink["aForumLink"] != ""){
echo "<a href='{$flink["aForumLink"]}'><img border='0' src='images/diskuterarticle.gif'></a>";
}
}

echo "<a href=\"javascript:OpenWin('printpage.php?articleId=$artic leId', 'prnArt', '650', '550', 'yes')\"><img border='0' src='images/printarticle.gif'></a>&nbsp;&nbsp;</div>";
echo "<table width='96%' align='center' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr>";
echo " <td>";
echo " <span class='BodyHeading4'>{$aRow["apTitle"]}</span>";
echo " <br><br><span class='Text1'>{$aRow["apContent"]}</span>";
echo " </td>";
echo "</tr>";
echo "</table>";
echo "<hr width='96%'>";

Reply With Quote
  #2  
Old June 12th, 2003, 12:15 PM
klausre klausre is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Norway
Posts: 14 klausre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have solwed the problem now

In this line: $forumlink = mysql_query("select aForumLink from tbl_Articles where pk_aId = '$ArticleId'"); the variable $ArticleId is whit bigg A. The problem was that the variable are case sensitive-ness, and should be $articleId is whit small a.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Get something from MySQL- problem-


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway