Hi - I want to print a list of numbers linked to URLs I create on the fly -
something like this:
 
table:
-------------------
path        pid
---------|---------

foo.jpg     1
bar.jpg     1

<?php
 
include("db_connection_params.inc");  //all relevant database variables
$sql="select path from table where pid =1";  //obvious
$link_id = mysql_connect($host, $usr, $pass); //get connection handle

$result = mysql_db_query($database, $sql, $link_id);
$count = mysql_num_rows($result) or die ("no rows returned from $sql");

$i = 0; //initialze counter

for (0 < $i > $count; $currrent_row = mysql_fetch_row($result); ++$i;)

{ 
  
  $path=$current_row[2]"; //database field position matched index number
  print "<a href = $path>$count</a><br>"; //
}  

?>

so I want this to print:
1  (linked to foo.jpg)
2  (linked to bar.jpg)

The problem is I'm getting a parse error on the "for" line.

Any ideas?

TIA,
andrew


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to