Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

problem with line 43

Links for php scripts

Moderators: macek, egami, gesf

problem with line 43

Postby begeiste » Fri Sep 24, 2004 2:25 pm

Hi;
I have tried displaying 4 thumbnail photos on 1 row in the table, and talbe repeats its self, but I got the error message:Parse error: parse error, unexpected ',' in /home/symphon1/public_html/vicphotodatabase/billboard_new.php on line 43

I have checked line 43, it seems it is fine. Can you tell me what is wrong with line 43? Thanks so much.

<?php require_once('Connections/victorphoto.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
mysql_select_db($database_victorphoto, $victorphoto);
$query_r_result = "SELECT * FROM billboard";
$r_result = mysql_query($query_r_result, $victorphoto) or die(mysql_error());
$row_r_result = mysql_fetch_assoc($r_result);
$totalRows_r_result = mysql_num_rows($r_result);
$queryString_r_result = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_r_result") == false && stristr($param, "totalRows_r_result") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_r_result = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_r_result = sprintf("&totalRows_r_result=%d%s", $totalRows_r_result, $queryString_r_result);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>billboard</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="photos.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="strip">
<div id="nav">
<?php require_once('inc_nav.htm'); ?>
</div>
</div>
<div id="strip-orange">
<a href="#" class="title">Gallery photos of Billboard</a>
</div>
<div id="strip-y">
</div>
<div id="container">
<table border="0" cellspacing="0" cellpadding="4" width="90%" bgcolor="black">
<?php
$query_r_result = ("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC ",$link);
$photocount = 0;
$x=1;
$cols=4;
while($row_r_result = mysql_fetch_assoc($r_result))
{
if($x==1)
print "\n<tr>\n";
print "<td valign='top'><a href='bill_detail.php?recordID=<?php echo $row_r_result['billboardID'];' ><img src='<?php echo $row_r_result['thumb']; ?>' alt='' border='0' id='i'><br>$values1[name]<br><font size='2' color='#FFCC00'>Click to Enlarge</font></a></td>\n";
//creates a new row
if($x==$cols)
{
print "</tr>";
$x=1;
}
else
$x++;
}
//fills in the additional cols
for($x;$x<=$cols;$x++)
print "<td >&nbsp;</td>\n";
?>
</tr>
</table>
begeiste
New php-forum User
New php-forum User
 
Posts: 83
Joined: Thu Jun 03, 2004 11:27 am

Postby Redcircle » Fri Sep 24, 2004 3:17 pm

Code: Select all
$query_r_result = ("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC ",$link);


what are you trying to do here. I think you forgot a mysql_query
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby begeiste » Fri Sep 24, 2004 4:17 pm

Can you show me what is the exactly you indicate? Thanks.




Redcircle wrote:
Code: Select all
$query_r_result = ("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC ",$link);


what are you trying to do here. I think you forgot a mysql_query
begeiste
New php-forum User
New php-forum User
 
Posts: 83
Joined: Thu Jun 03, 2004 11:27 am

Postby gesf » Sat Sep 25, 2004 10:09 am

This:
Code: Select all
$query_r_result = ("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC " . $link);

Instead of:
Code: Select all
$query_r_result = ("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC ",$link);


BTW, what is your $link !?
User avatar
gesf
Moderator
Moderator
 
Posts: 1718
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden

Postby daku » Sun Sep 26, 2004 10:26 pm

Code: Select all
$query_r_result = ("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC ",$link);


I think this should be

Code: Select all
$r_result = mysql_query("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC ",$link);


right?
daku
New php-forum User
New php-forum User
 
Posts: 4
Joined: Sun Sep 26, 2004 8:32 pm
Location: Tangerang

Postby gesf » Mon Oct 04, 2004 1:33 am

Yep, that's it :D
If you have problems, remember that - dot - i used at the end of the query!
User avatar
gesf
Moderator
Moderator
 
Posts: 1718
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.