I get the idea, I endevoured to take it a step further by deleting all the records from the original table for each dogs_bfa_no added, but for some reason no records are deleted Have I missed something obvious?
// Create a table with all relevent records for the year in question
$query =...
I have created a query, which populates a table, but I would like to omit any records that are already in the table. For example dogs_bfa_no = 1234 is already in the table to be populated and therefore I would like to populate with the next one in line
Any ideas / pointers appreciated code...
Is there a way to filter a timestamp? Specifically I would like to filter all rows with a timestamp that relate to a time before 12 noon, the date is irrelevent in this particular query.
TIA
NigeB
Ok, this is my train of thought
1. create a temporary table and populate with 3 records all with an AM (morning start time)
2. insert a field to be used with the formatting later
3. repeat 1. above for PM
4. insert a different formatting field for the field is blank
5. select the...
My query (listed above) brings back 3 records with numerous fields, one being a time, which is formatted into AM or PM depending on the timestamp value.
What I would like to know is how do I create an output for each record depending on the value of the respective timestamp value, that I can...
I think you misundertand me, sorry, I can get the data out, and format the code - no problem, but can I specify the criteria based on a query result?
The UNIX Timestamp does the formating into AM / PM but based on the result can I then ipose a criteria?
Regards
Nigel
Yes the question is how to format a field as a reult of that field, i.e. if it's AM (morning) i would like to format in one way and another way for PM.
Is it possible with mysql?
Regards
NigeB
Is it possible to apply formating font code as a result of a date time?
What I am trying to do is present a list of courses (the result of a query) and Would like to colour all the "am" times Blue and "pm" times Red.
I am just after a few pointers in the right direction.
A snippet of the...
...$c_row["country"]);
$region = $c_row["country"];
$query = "SELECT * from teams_online where country = '$region' order by team_name";;
$res2 = mysql_query($query);
if (mysql_num_rows($res2) > 0)
{
while ($t_row = mysql_fetch_assoc($res2))...
...$result1 = mysql_query($query1);
while ($row = mysql_fetch_array($result1)) {
$region = $row"country";
$query2 = "SELECT * from teams_online where country ='$region' order by team_name";
$result2 = mysql_query($query2);
}
mysql_free_result($result1)...
...for inserting a header in this loop? As all that comes back is one Country and a long list of teams for that country.
$query1 = "SELECT * from teams_online order by country, team_name";
$result1 = mysql_query($query1);
echo "<table width=600 border=1>\n";
while...
...$result1 = mysql_query($query1);
while ($row = mysql_fetch_array($result1)) {
$region = $row["country"];
$query2 = "SELECT * from teams_online where country ='$region' order by team_name";
$result2 = mysql_query($query2);
}
mysql_free_result($result1)...
deecee,
below is a script I use for doing just that, a simple html form posts the data to this form that does the work. Note $page and $fext are my variables.
The line -
substr("$newfile", 38);
strips the /home/extrabucc/public_html/schedules/ so that just the filename is...
I generate a table of information from a MySQL query and then I would like to select a field in a row of data, by clicking onit, it posts that hyperlink to a new page as post data, is this possible if so how?
TIA
NigeB
...just fine.
Thanks for all the tips and instructions, sometimes at 3am you just miss the most obvious....
Thanks again guys.
Regards
Nigel.
********************************************
$query = "SELECT DISTINCT Team FROM Teams";
$result = mysql_query($query) or die("Query...
...: You have an error in your SQL syntax near 'Stars ORDER BY Ttimes.Fastest_Time DESC LIMIT 5'
Stars is the first team in the table.
TIA
Nigel.
**************************************************
Complete Code -
$query = "SELECT DISTINCT Team FROM Teams";
$result =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.