Zirt
|
Posted: 07/09/2002, 10:58 AM |
|
Three questions:
These are both for a portal that will show season points for a local Go-kart
club.
1.
I have a grid that displays the date in the default format: yyyy-mm-dd
(2002-05-25). I want to change it so that it displays in the following
format Month dd, yyyy as in May 25, 2002. How do I go about this. I am
using php and mySQL.
2.
From a table I have the user enter the current race stats. No problem here.
My problem is how do I total the results for each racer? The database is
called WRKC3 and I use the following tables: race_stats - relevant fields =
racer_id, race_no, and final points. There are several other tables that I
join to but they aren't relevant here. (i.e, I display the racer's name
instead of their ID from the drivers table.)
3.
I have a classified ads section on the old web site. As it is written in
php and uses a mySQL database, I don't want to rewrite it into my portal
using CodeCharge. I just want to link to it from CodeCharge. I know how to
put a link on a page to it, but how do I put a link to it using a graphic as
the link? Everything I find is showing how to link from a graphic to a
CodeCharge page.
Thanks in advance,
Jeff
|
|
|
Xavier
|
Posted: 07/10/2002, 12:56 AM |
|
"Zirt" <jhswanson@rogers.com> ha scritto nel messaggio
news:agf88t$jac$1@news.codecharge.com...
> Three questions:
>
> 1.
> I have a grid that displays the date in the default format: yyyy-mm-dd
> (2002-05-25). I want to change it so that it displays in the following
> format Month dd, yyyy as in May 25, 2002. How do I go about this. I am
> using php and mySQL.
I suppose your date column is a timestamp.
Then, in Before Show Events of your form place code like this:
$fldtimestamp_name=date("M d, Y",strtotime("$fldtimestamp_name"));
You can get many other different date formats working on the string "...."
in date(). See php manual.
> 2.
> From a table I have the user enter the current race stats. No problem
here.
> My problem is how do I total the results for each racer? The database is
> called WRKC3 and I use the following tables: race_stats - relevant fields
=
> racer_id, race_no, and final points. There are several other tables that
I
> join to but they aren't relevant here. (i.e, I display the racer's name
> instead of their ID from the drivers table.)
In SQL of the grid form, use something like:
select sum(final_points) from table_name group by racer_id;
>
> 3.
> I have a classified ads section on the old web site. As it is written in
> php and uses a mySQL database, I don't want to rewrite it into my portal
> using CodeCharge. I just want to link to it from CodeCharge. I know how
to
> put a link on a page to it, but how do I put a link to it using a graphic
as
> the link?
Can u explain better? If you just want an url image use <img
src="imagename.gif" border="0"> before the text of the link.
Regards,
Xavier
|
|
|
|