Re: script output doesn't show up

From: Date: Tue, 13 Mar 2001 05:17:03 +0000
Subject: Re: script output doesn't show up
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43621@lists.php.net to get a copy of this message
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>$fname&nbsp;$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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#43621) next »