Re: Some advice / points / help
| From: | Jochem Maas | Date: | Fri, 05 Jan 2007 15:37:27 +0000 |
| Subject: | Re: Some advice / points / help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246604@lists.php.net to get a copy of this message | ||
Steven Macintyre wrote:
> Hi guys,
>
> Some intelligent minds needed again ...
I dont think I count - mostly because I don't even
understand the question.
> I have the following "schematic" to
> work to ...
>
> http//steven.macintyre.name/arb/showlineups.jpg
that URL make my browser end up here:
http://www.w3.org/Protocols/
is .name even a top level domain? did that happen whilst I was sleeping?
>
> I need to "fill" that with data from a mysql table ...
>
> The format of the table is as follows;
>
> CREATE TABLE
kayasite_schedule (
> id int(11) NOT NULL auto_increment,
> tid int(6) NOT NULL,
> showname mediumtext NOT NULL,
> day varchar(10) NOT NULL,
> blurb longtext NOT NULL,
> show_start time NOT NULL default '00:00:00',
> show_end time NOT NULL default '00:00:00',
> who varchar(25) NOT NULL default '',
> uid int(6) NOT NULL,
> pic varchar(60) NOT NULL default '',
> UNIQUE KEY id (id)
> ) ENGINE=MyISAM
>
> Now, as you can see the time slot are the items "show_start", "show_end"
> (which I can do) the names are from the table (who) - can anyone start me
> off on the correct route to get this done.
>
> The layout does not have to be exactly like that - but - the days across top
> have to - so if there are gaps in "time slots" etc we can handle that
>
>
> This is way beyond my level of knowledge and have NO idea where to start.
in very broad terms (with out taking any account of error checking):
0. connect to mysql database
http://php.net/mysql
http://php.net/manual/en/function.mysql-connect.php
1. define an sql query
e.g. $sql = "SELECT * kayasite_schedule"; // lame example query
2. perform the query
http://php.net/manual/en/function.mysql-query.php
3. loop the result to output tabular data
http://php.net/manual/en/function.mysql-fetch-assoc.php
http://php.net/foreach
http://php.net/echo
>
> As always - your assistance appreciated!!
the manual is your best friend, if you don't understand something in the manual
(i.e. the links above) come back and ask ... don't forget to tell us where/what you don't
understand :-)
good luck
>
>
>
> Kind Regards,
>
>
> Steven Macintyre
> http://steven.macintyre.name
> --
>
> http://www.friends4friends.co.za
>