Re: Please help asap
| From: | Bogdan Stancescu | Date: | Fri, 04 Jan 2002 19:38:08 +0000 |
| Subject: | Re: Please help asap | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15404@lists.php.net to get a copy of this message | ||
In the printf() line after "5 6 7" you try to print "%s" 24 times but only
provide 10 values. That may have something to do with it...
Bogdan
Jeff Moncrieff wrote:
> Hello
>
> I am trying make a script fatch my data form my mysql database. I use
> this script but when execute it is says
> Warning: printf(): too few arguments in
> /home/httpd/html/larken/database.php on line 47
>
> any hints
> Thanks Jeff
>
> <html>
>
> <body>
>
> <?php
>
> $db = mysql_connect("****", "root");
>
> mysql_select_db("larken",$db);
>
> $result = mysql_query("SELECT * FROM custgeninfo",$db);
>
> echo "<table border=1>\n";
>
> echo "<tr><td>Name of contact</td><td>Name of
> company</td><td>
> Address</td><td>Postal Code</td><td>Format
> Mail</td><td>Email
>
> Address<td>model</td><td>Comment</td><td>telephone</td><td>Notes</td><td>County</td><td>
>
> ID </td></tr>\n";
>
> while ($myrow = mysql_fetch_row($result)) {
>
> // 1 2 3 4
> 5 6 7
>
> printf("<tr><td>%s%s</td><td>%s%s</td><td>%s%s</td><td>%s%s%s</td><td>%s%s</td><td>%s</td><td>%s%s%s</td><td>%s</td><td>%s%s</td><td>%s</td><td>%s%s%s%s%s</td></tr>\n",$myrow[1],$myrow[2],$myrow[3],$myrow[4],$myrow[5],$myrow[6],$myrow[7],$myrow[8],$myrow[9],$myrow[10]);
>
> }
>
> echo "</table>"
>
> ?>
>
> </body>
>
> </html>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net