[PHP] script output doesn't show up

2001-03-12 Thread John Meyer

Here is the code

  ?php
   $connectionid = odbc_connect("usctoday","","");
   $resultid = odbc_do($connectionid,"SELECT S_FNAME, S_LNAME, S_BIO FROM
STAFF;");
   $numrows = odbc_num_rows($resultid);
   for ($i = 1; $i=$numrows;$i++) {
 odbc_fetch_row($resultid);
 $fname = odbc_result($resultid,"S_FNAME");
 $lname = odbc_result($resultid,"S_LNAME");
   ?
h2?php echo("$fname"); ? nbsp; ?php echo("$lname"); ?/h2
   ?php
   }
   odbc_close($connectionid);
   ?

Problem is that the script output doesn't show up.  Any idears?



-- 
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]




Re: [PHP] script output doesn't show up

2001-03-12 Thread Jack Dempsey

i don't know how similar the odbc functions are to the mysql functions,
but in your sql statement you have:
FROM STAFF;
whenever i create an SQL statement when using a MySQL database i don't
have to put that semi-colon in there...is that needed for odbc?
also, just to save yourself some space, you could condense your last few
lines into this:
$lname = odbc_result($resultid,"S_LNAME");
echo "H2$fnamenbsp;$lname/h2";
hope this helps,
jack

John Meyer wrote:
 
 Here is the code
 
   ?php
$connectionid = odbc_connect("usctoday","","");
$resultid = odbc_do($connectionid,"SELECT S_FNAME, S_LNAME, S_BIO FROM
 STAFF;");
$numrows = odbc_num_rows($resultid);
for ($i = 1; $i=$numrows;$i++) {
  odbc_fetch_row($resultid);
  $fname = odbc_result($resultid,"S_FNAME");
  $lname = odbc_result($resultid,"S_LNAME");
?
 h2?php echo("$fname"); ? nbsp; ?php echo("$lname"); ?/h2
?php
}
odbc_close($connectionid);
?
 
 Problem is that the script output doesn't show up.  Any idears?
 
 --
 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]

-- 
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]