On Tue, 13 Feb 2001 13:55, Malouin Design Graphique wrote:
> Hi,
>
> Is there anything wrong with this code below?
> Any help or fix to this code would be very much appreciated.
>
>
>
> The file to get the data out (gif file):
> --------------------------------
> <?php
>
> /* data_out.php3 */
>
> $db = mysql_connect("www.server.com", "root", "password");
> mysql_select_db("db_name", $db);
> $sql = "select * from table_name order by 'date'";
> $sql = "select * from table_name";
> $result = mysql_query($sql);
> while ($row = mysql_fetch_array($result)) {
> print("<tr><td bgcolor=\"#003399\">");
> printf("<img src=\"$indice_url\">%s</td></tr>\n",
> $row["indice_url"]);
> }
> ?>
>
Assuming that indice_url is a URL to an image file on the filesystem,
that looks like it should work (although I don't understand printf <g>;
can't see why that couldn't be just echo). So what shows up in your
source?
>
>
>
> Here's the "tiny" table that feeds it:
> --------------------------------
> CREATE TABLE indice (
> id int(11) DEFAULT '0' NOT NULL auto_increment,
> date text,
> indice text,
> indice_url varchar(255),
> PRIMARY KEY (id)
> );
> --------------------------------
Date as a _text_ field? You'll never have a Year 20000000000000 bug
problem :-0
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
--
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]