|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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> </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%'>"; |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Get something from MySQL- problem- |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|