RE: [PHP-DB] Help Me Fix My User Defined Funtion
| From: | SOHH.com Webmaster | Date: | Thu, 19 Apr 2001 21:45:23 +0000 |
| Subject: | RE: [PHP-DB] Help Me Fix My User Defined Funtion | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8727@lists.php.net to get a copy of this message | ||
Ok, fair enough.
Basically the top had all my MySQL calls and then it's followed by -
<?php
while($row_listbyreads = mysql_fetch_array($result_listbyreads)) {
$sectionID = $row_listbyreads["sectionID"];
$contentcount = $row_listbyreads["contentcount"];
$contentheadline = stripslashes($row_listbyreads["contentheadline"]);
$contentID = $row_listbyreads["contentID"];
generatesectionlink($sectionID,$contentID)
?>
<tr>
<td><a href="<?php echo $link; ?>"><?php echo $contentheadline;
?></a></td>
<td><?php echo $contentcount; ?></td>
</tr>
<?
}
?>
However, since posting my question, I have solved it by doing the following:
<?php
while($row_listbyreads = mysql_fetch_array($result_listbyreads)) {
$sectionID = $row_listbyreads["sectionID"];
$contentcount = $row_listbyreads["contentcount"];
$contentheadline = stripslashes($row_listbyreads["contentheadline"]);
$contentID = $row_listbyreads["contentID"];
?>
<tr>
<td><a href="<?php echo generatesectionlink($sectionID,$contentID);
?>"><?php echo $contentheadline; ?></a></td>
<td><?php echo $contentcount; ?></td>
</tr>
<?
}
?>
Which works but what if I wanted to use the results to do something else?
Like take the string ($link) and count the lenght of it (just an example).
Steven
-----Original Message-----
From: Mark Roedel [mailto:MarkRoedel@letu.edu]
Sent: Thursday, April 19, 2001 11:21 AM
To: webmaster@sohh.com
Subject: RE: [PHP-DB] Help Me Fix My User Defined Funtion
> -----Original Message-----
> From: SOHH.com Webmaster [mailto:webmaster@sohh.com]
> Sent: Thursday, April 19, 2001 3:32 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Help Me Fix My User Defined Funtion
>
>
> I created a funciton to pass two variables and create a
> dynamic link. It doesn't give me an error, but it doesn't
> give me the results either. What am I missing in my
> function? (It's down below)
The function itself looks fine to me...is it possible there's a problem
in the way you're calling it? (How 'bout a code snippet showing that as
well...)
---
Mark Roedel (roedelm@letu.edu) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My schedule is already full."
LeTourneau University || -- Henry Kissinger