- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
31 Posted Topics
Good Morning, I am trying to run a mysql query to see if the field 'Date' is within 7 days of the current date or not. If it is less than 7 days old, I want to echo an image called current.jpg. If it is more than 7 days old, … ![]() | |
I have two tables that I would like to work together (stories and events). Stories is a table that is used to produce articles on a website and events is a series of events put into a table. I would like to be able to add events to story based … | |
I have a form where the user can simpy enter the field they want to query and it takes them to an update page. In that page I define the variable as follows: <?php $tcode="$_POST[teamID]"; ?> Then in various places I can use $tcode to insert the result from the … | |
Posted earlier in the wrong forum...update here: Hey there...my code below had tradtionally only updated 1 of 4 fields. Now I want to update 2 of 8, but when I enter two variables it crashes. Any help would be appreciated. Code is here if( isset($_POST['Submit']) && $_POST['Submit']=='Submit' ) { foreach($_POST['CFHL_A'] … | |
I have tried a number of things and all of them have crashed. My code is below. I am writing code for a form to upload three photos and this code works fine to upload three photos. What I am stuck with is: 1) I would like the form to … | |
I am trying to add the Facebook Comment plugin to my site. http://www.ourhometown.ca/hockey/nhl/NHL0017.php When you visit the link in Firefox you get the above URL. If you hit refresh, you get something like: http://www.ourhometown.ca/hockey/nhl/NHL0017.php#.UbAQAth230c This lack of a static url will cause issues for the site. Does anyone know how … | |
I have a page on my site where I want to update only certain fields. There is a php form tht captures the data. Currently, when I update one field - it blanks out all the others. I want to be able to only update the one field and if … | |
On days when my site gets a lot of traffic, I get this error message... Warning: mysql_connect() [function.mysql-connect]: User OH_admin already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\ourhometown.ca\httpdocs\includes\all.oh.front.inc.php on line 3 User OH_admin already has more than 'max_user_connections' active connections Can someone point me in the direction in how … | |
Good Evening...I have a number of RSS feeds that most readers can work with... [url]http://www.ourhometown.ca/rss/all/[/url] In some cases, they say it is not well formed, so I have tried to modify it. I think I am close. What am I missing? [CODE]<?xml version="1.0"?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>OH: All Hockey … | |
This page works in IE http://www.ourhometown.ca/index.php in that the links on the left hand stories are not blue on the purple. But the smae page in Firefox is off...it uses the default blue and purple links. Here is my code <!--IN Style section --> #secondary_title2 { margin: 0.2em 4; padding:0px; … | |
I have a database with a listing of events. I do not want to include events that have already happened, so I want to query the db for events from the current date going forward. I have tried a number of things but it is not working. Here is what … | |
Good Afternoon, I am looking to create a page where I can enter data into a form and use INSERT to enter into the database. In the code example below, I have shown only 3 fields, but my page will have 13 fields and I want to designate 8 of … | |
Good Morning, I am writing code for a Hockey Pool site and I am working on the Standings page...typical divisional standings page. My code runs through a loop for the four teams in each division and yields results for each team and outputs fine. Here is my problem...I want to … | |
Good Morning, I am working on a hockey pool site and am trying to build a standings page. You can see my output here [url]http://www.cornwallfantasyhockey.com/cfhl/standings2/[/url] I would like to be able to write code that will sort the PTS column in descending order, however the PTS value in each row … | |
I am trying to build a Standings page for a hockey pool site that shows Wins, Losses, Ties, etc. I am struggling with the Tie section. If two teams have the same number of points (PF=PA) the team gets one point. I can get this part to work. However, at … | |
I would like to query a set of values from a db....say GP1011_wk1 and this would yield 11 results. I then sum them together and get a value that i can echo. No problem so far. My question is, can i now take this calculated value from the query and … | |
Good Morning, I am hoping someone can help me. I am not even sure if this is possible. I am building a hockey pool site and I would like to automatically update the value of a variable once a week or 26 times. I would like to use the clock … | |
Here is my problem. I have a table that produces 11 names with 2 values for each. These values are derived by subtracting one field in the database from the other. I have no problem gettign the table to produce those 22 values, but now I want to total each … | |
Good Morning, I am looking for some code that will simply echo "0" when the result is negative. I dont want it to output a negative number. Here is the line I am looking to add this to: [code] echo $row['GP1011_'.$wk.'']-$row['GP1011_'.$prev.'']; [/code] Any help is appreciated. Thanks Chris ![]() | |
I am learning mySQL and PHP and am very appreciative of the help I have received here. As some of you know, I am working on a Hockey Pool site. One of my first experiments was to build a static form on a php page that would take the input … | |
Good Afternoon, I have this line of code: echo $sum['PTS1011_wk1']; Earlier in my page, I have set a variable to: $wk="wk1"; What is the syntax to use the Variable $wk instead of spelling out wk1. I want to be able to change $wk once and have it change throughout a … | |
Good Evening, I have a table that has a field with 15 entrys in it. I would like to output it from a query in a table that has 3 rows of 5. However, whenever I put a <tr> inside the loop, I get 15 rows. Any idea how I … | |
Good afternoon, Instead of starting a new row every time I have new data, I want to simply put a line break. I have put in <br> but it makes the page too long as it yields a break each time and not just the times that it has data. … | |
Here is what I have [code] echo "<img src='/images/bar_".$row['teamA'].".jpg'>"; [/code] in this example teamA = irish What I want to output is <img src='/images/bar_irish.jpg'> I think it is a simple syntax. What am I missing? | |
As you can see from this page: [url]http://www.cornwallfantasyhockey.com/cfhl/schedule3/[/url] I have created an output table of 11 players. I would now like to total the GP and PTS column. Here is what I have so far: any thoughts? [code] <?php $result = mysql_query("SELECT * FROM stats1011 where 1A = 'BULL' OR … | |
Is it possible to create a hard page return in your PHP code so that wehn the user prints the output, the page break will occur where it is defined? If this is possible, how is it done. I have not found anything in my Google searches. Any help is … | |
Good Morning, I am building a hockey pool site and here is some background on my problem. Our league allows each player to be drafted twice. So we have given each player an A or B listing (ie Sydney Crosby A or Sydney Crosby B). In my database, I have … | |
I am wondering if anyone knows of a way to post information about the database on the site. What I am looking for is the php code to display the information below. For example: 1) This 'tableXX' in 'databaseXX' has XXX rows. 2) This 'tableXX' was last updated on 'DATE' … | |
I know how to limit the number of rows returned in a query: [code] $result = mysql_query("SELECT * FROM playerdb where CFHL_A = 'XMEN' OR CFHL_B = 'XMEN' order by field(pos,'LW','C','RW','D','G'), PTS0910 DESC LIMIT 0, 11") or die(mysql_error()); [/code] However, now I am looking to fix a table to 25 … | |
What I am trying to do is to run a query in my database and output a table to a php file. If the query yields 10 resuts or rows, I would like the far left column to read 1,2,3,4,5,6,7,8,9,10. What happens now is it outputs all 1's in the … | |
I am working on a Hockey Pool stat project. My PPG column is a calculation that divides PTS by GP. This works fine for anyone that has played a game. However, in the case of Rookies or the very beginning of the season the GP number is 0. As such, … |
The End.