|
Posted by robert on 05/18/06 01:36
<c.wrinn@gmail.com> wrote in message
news:1147902579.674272.10610@j33g2000cwa.googlegroups.com...
| First, here is my current script:
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| <html>
| <head>
|
| </head>
| <body>
|
| <?
| $mysql = mysql_connect("localhost","cwrinn","cw5324") or die('Unable
| to Authenticate to ODBC'.mysql_error());
| mysql_select_db(snapon_dev, $mysql) or die('Error Selecting
| Database'.mysql_error());
| $result = mysql_query("select * from branch limit 0,30", $mysql) or
| die('Error querying database'.mysql_error());
|
| while ($row = mysql_fetch_row($result))
| {
| for ($i=0; $i<mysql_num_fields($result); $i++)
| echo $row[$i] . " ";
|
| echo "\n";
| }
| mysql_close($connection);
| ?>
| </body>
| </html>
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| What's happenning? Nothing, no error, no display, nothing.
and you've run "select * from branch limit 0, 30" in a query browser and
gotten results back? have you tried adding "print_r($row);" within your
while statement?
btw, NEVER put a calculation in the condition of a FOR statment IF THAT
CALCULATION DOES/WILL NOT CHANGE...otherwise, you are being HIGHLY
inefficient which translates to SLOW scripts!
Navigation:
[Reply to this message]
|