Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About AS147

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. By the way Barand, I am looking for a developer to provide a website for us with the capabilities to schedule and run events. Below is a summary of what we are looking for and wondered whether you could recommend someone. It would be ideal if they were based in Australia but that is flexible. My view is that we should default to looking at using as much off the shelf capability for our website as possible to reduce cost and complexity and time to deliver. There may be some customisations and most off the shelf products support customisations. I strongly recommend you look at the f
  2. I am a bit confused, as the form used to show Type:Timestamp Default:Current_timestamp. Wouldn't that produce the same issue i.e. that it is the current year? Its entirely possible that we have never entered the net years calendar until that year but I doubt it. I have only been involved in this system for a few years and never dealt with the calendar before.
  3. We now have a problem adding new tournaments this year caused by the SQL upgrade moving to STRICT mode. Without that we have had no issues adding tournaments each year. Are you suggesting even if the changes we have made to fix tourn_year did not throw up the site_visible error we would have a problem next year? Could you explain why if that is the case please? I will certainly look into PDO but my main focus is to troubleshoot the site_visible error. Any other racing or suggestions you could make please? Agaian, thankyou very much my knowledge about PHP has increased fro
  4. Sorry some of this is over my head as I am not a php developer and I have inherited this code. My key goal is to get this error (site_visible) fixed and then hand the whole site over to a proper developer organisation as its over 15 years old written code by a self taught person over many years. Are you suggesting any of the below are a likely contributor to the site_visible error message? Is you comment about hidden input fields referring to this part of the code? <input type="hidden" name="tourn_id" value="" /> <input type="hidden" name="tourn_ye
  5. Perfect! The list to view and add tournaments is now working. Thanks VERY much. You asked me to insert the echo in the tournament_insert php (apologies for not understanding where it belonged and appreciate your patience). Here is what the echo returns. We wanted to see what the site_visible value returned was for the error Column 'site_visible' cannot be null I get this.. Array ( [tourn_name] => TEST ECHO [tourn_class] => Aust Rank [ranking_type] => No Entry [how_seed] => NA [site_visible] => Yes [tourn_typ
  6. Missing open bracket, got it thanks.
  7. I am still getting "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY tournaments.tourn_type DESC, tournaments.tourn_name' at line 1" Here is all the code I changed as I believe you suggested. I have highlighted the areas I have changed in bold black and those that I think might be causing the problem in bold red $query_tourn1 = "SELECT * FROM tournaments WHERE tourn_year = YEAR(CURDATE()) AND tourn_type='Snooker' AND status='Open' ORDER BY tournaments.tourn_name"; $tourn1 = my
  8. I get this error when I make the change as listed below "Parse error: syntax error, unexpected T_ECHO in /home/customer/www/vbsa.org.au/public_html/Admin_Tournaments/user_files/tournament_edit.php on line 90" if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $updateSQL = sprintf("UPDATE tournaments SET tourn_name=%s, tourn_year=%s, site_visible=%s, tourn_type=%s, ranking_type=%s, tourn_class=%s, how_seed=%s, status=%s WHERE tourn_id=%s", GetSQLValueString($_POST['tourn_name'], "text"), GetSQLValueString($_POST['tourn_year'], "date")
  9. I managed to find this out by trying myself also so thanks. I am learning !🙂 There is one more piece of code that lists the tournaments, this page allows you to edit and add entrants and is slightly different code (below) When I change WHERE YEAR(tourn_year) = YEAR(CURDATE()) to WHERE tourn_year = YEAR(CURDATE()) I get this error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY tournaments.tourn_type DESC, tournaments.tourn_name' at line 1" Is the code for Tyear
  10. Lastly, it appears the value for the tourn_year is used to display the list of tournaments. The display of the tournaments depends on being in a format YYYY-MM-DD HH:MM:SS because when I enter just the year with the new column definition recommended the tournaments do not appear in the list. When I set the column definition back to TIMESTAMP CURRENT_TIMESTAMP and enter YYYY-MM-DD HH:MM:SS in a tournament record the tournament appears in the list of tournaments again. The code that displays the tournaments is below and think with the changes you recommended in the insert_tournament
  11. Sorry I realized that after I re read it. I set the values in the column as stated `tourn_year` year(4) NOT NULL DEFAULT '0000', Then made this change to the code (below) but get this error "Column 'site_visible' cannot be null" Site_Visible defines whether the event appears on the website. The value is either 'Yes' or 'No' and set from the drop down on the form if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO tournaments (tourn_id, tourn_name, tourn_year, site_visible , tourn_type, ranking_type, tourn_cla
  12. Thanks, does this look correct? I get "Parse error: syntax error, unexpected T_STRING in /home/customer/www/vbsa.org.au/public_html/Admin_Tournaments/user_files/tournament_insert.php on line 84" Line 84 is the first line in bold below `tourn_year` year(4) NOT NULL DEFAULT '0000', if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO tournaments (tourn_id, tourn_name, tourn_year, site_visible, tourn_type, ranking_type, tourn_class, how_seed, status) VALUES (%s, %s, CURDATE(), %s, %s, %s, %s, %s, %s)",
  13. When I try to define the column as YEAR I am not sure what to set the default value to as the only options are NULL - NULL would not be permitted in STRICT SQL mode AS DEFINED - which I assume would then then need me to insert this via the PHP form NONE - wouldn't produce the result of populating the current year CURRENT_TIMESTAMP (what we have at the moment) - fails Is there a way for the column in Strict mode to auto populate with the year as it did previously?
  14. ....Also I notice there is a column value available of YEAR, would that be more appropriate as the column definition?
  15. Thanks folks. Its only purpose is to record the year of the tournament. We maintain a history of all tournaments by the year of the tournament. The consensus from both your replies is that the value of that column should not be timestamp. I like the idea that we don't insert data into that column in the insert query as it sounds like the simplest approach (delete the insert of that variable). Under this set up can you confirm what column should be defined to so we have the ability to display the year in the form? I also like the idea of setting the year in PHP an
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.