Current location: Hot Scripts Forums » Programming Languages » PHP » Get something from MySQL- PHP/MYSQL problem-


Get something from MySQL- PHP/MYSQL problem-

Reply
  #1 (permalink)  
Old 06-12-03, 04:16 AM
klausre klausre is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Norway
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Get something from MySQL- PHP/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 =$articleId', '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%'>";
__________________
Regards
Klaus Andreassen
Norway
Reply With Quote
  #2 (permalink)  
Old 06-12-03, 05:12 AM
Stefan's Avatar
Stefan Stefan is offline
Junior Code Guru
 
Join Date: Jun 2003
Location: Utrecht, The Netherlands
Posts: 599
Thanks: 0
Thanked 0 Times in 0 Posts
in your query you seem to refer to the id of the article as $ArticleId where just a few lines up they were using $articleId ... so it might be a matter of case sensitive-ness ?
Reply With Quote
  #3 (permalink)  
Old 06-12-03, 12:18 PM
klausre klausre is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Norway
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you!!That was the problem
__________________
Regards
Klaus Andreassen
Norway
Reply With Quote
  #4 (permalink)  
Old 06-12-03, 12:49 PM
Stefan's Avatar
Stefan Stefan is offline
Junior Code Guru
 
Join Date: Jun 2003
Location: Utrecht, The Netherlands
Posts: 599
Thanks: 0
Thanked 0 Times in 0 Posts
hehe. no problem. glad it's working now
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
Forum/Board - MySQL = Possible? cipher PHP 7 10-07-03 03:42 AM
great product for dumping/recovering MySQL databases Dave Brown General Advertisements 1 10-03-03 07:40 AM
MD5 MYSQL Problem tgarske PHP 5 08-24-03 04:31 PM
MySQL with PHP question. HELP for a newbie kenfused PHP 3 08-02-03 12:53 AM


All times are GMT -5. The time now is 06:33 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.