Jim R
Members-
Posts
988 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Jim R
-
Makes sense! I'll play around with it today. (I'll likely be back.) That will likely help me with the scheduling query you helped me with, as there will definitely be some archiving there as well.
-
Querying data for Notes that will have new instances each season (November 1-March 31), and as each season passes by I want the information produced to reflect the information at the time the query was made. (This is for scouting) Columns are... id schoolID (copied from another table) players season So for example, I want each time I use this query for a Note from November 1, 2019 through March 31, 2020, to use rows where season = '19-20', and as we move into next season '20-21' I'll create new instances for each school I use. The previous seasons of information will be archived but still viewable, so when someone goes back to read information from 2019-2020 season, I want the 19-20 rows to still be showing. I'm thinking this through as I'm typing... As I'm creating these Notes, they do leave a post date yyyy-mm-dd, I'd assume I could use that as a reference point.
-
There was a light plugin via WordPress that took care of it. Not sure it "solves" the problem, but then again, it could be a WordPress/theme issue. As long as it works, I'm good.
-
Not as intended, and I had tried that earlier. Sticky is supposed to keep the DIV relative until the "Top" is reached, then stick there. Maybe it's a theme issue too that I'm using for WordPress, as it hides behind the main navigation until that is off screen. I need it visible the whole time. I thought I was doing well to find the "main" issue that keeps "sticky" from working (overflow: hidden;), but I don't have that issue.
-
BTW...the DIV in question is in red, and I'm trying to get it to stick to the top of the browser as the User scrolls down.
-
Here is the page in question: https://www.courtsideindiana.com/season-preview/19-20/sectional1920/?sectional=8 I don't have any -- overflow: hidden; -- issues, at least not from what I see when I inspect the element. I do my work in Safari, but I test a lot in Developer mode as well as a separate Chrome browser. CSS div.navigation { position: -webkit-sticky; position: sticky; top: 0px; background-color: red; padding: 10px; font-size: 20px; } PHP/HTML echo '<div class="navigation">Hello</div>';
-
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
I went back to this query: SELECT * FROM a_players WHERE team=' .$team.' ORDER BY nameLast ASC'; Everything appears to be working. Does anyone have any idea why adding %26 would change the results of what even gets noticed? -
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
(Thank you for unlocking the topic.) I tried the global GET: it produced Array ( [nameFull] => Evan-Borgman ) Interestingly, I read something somewhere that said to add %26 (numerical ampersand value), and this is what I got: Array ( [nameFull] => Evan-Borgman [&team] => 16 ) So I changed the top of the code to: $team = $_GET['&team']; echo $team; And it produced the correct 16. However, it's still not taking $team = 16 and using it in the query. -
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
I made the change. It's not echo $team, so it's not GETting anything. That's the perplexing part. No matter how I use team=16, it doesn't pass the value. I have even tried it as the only value. -
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
When I echo $playerName it show (in the case of this page) Evan-Borgman. I have flipped flopped the GET's. $_GET('nameFull') always works, $_GET('team') never works. I keep looking to make sure it isn't some syntax error. @chriscloyd, I'll have to try that out after a meeting. I wanted to answer the question of what shows up when I echo nameFull. I'll have to keep the SELECT * though because I'll be adding more information to the printout. That was just a quick port from another instance where it was just a list of names. Does it matter that I have two GETs on the page? My instinct says no, and I did flip flop the GET's (instances) on my page with the same result. Here is the side that is working: $playerName = $_GET['nameFull']; //echo $playerName; $query = 'SELECT * FROM a_players ORDER BY uniform ASC'; $results = mysql_query($query); while($line = mysql_fetch_assoc($results)) { $nFirst = $line['nameFirst']; $nLast = $line['nameLast']; $nameFull = "{$nLast}{$nFirst}"; if ($playerName == $line['nameFirst'].'-'.$line['nameLast']) { echo ' <div class="profile">'; echo '<div class="profileName">' .$line['nameFirst'] . ' ' .$line['nameLast'] . '</div>'; echo '<div>'. $line['feet'] . '\'' . $line['inches'] . '", '; if ($line['position'] == 'PG') {echo 'Point Guard';} elseif ($line['position'] == 'SG') {echo 'Shooting Guard';} elseif ($line['position'] == 'SF') {echo 'Small Forward';} elseif ($line['position'] == 'PF') {echo 'Power Forward';} elseif ($line['position'] == 'C') {echo 'Center';} echo '</div>'; //echo '<img src="http://spieceindyheat.com/2015/images/player_boards/hardwoodBW/' . strtolower($nLast) .'' . $line['nameFirst'] . '.png" width="250">'; echo '<div>Class of 20' . $line['team']. '</div>'; echo '<div>'; if (!isset($line['city'])) { echo $line['school'] .' HS'; } else { echo $line['city'] . ' ('. $line['school'] . ')'; } echo '</div><!--more-->'; if ($line['team'] < 19) { echo '<div>Coach ' . $line['coachSchool'].'</div>'; } // echo $line['schoolAddress'] . '<br>'; // echo $line['schoolCity'] . ' IN, ' . $line['schoolZip'] . '<br>'; // echo $line['schoolPhone']; echo '</div> <hr class="profile">'; } } -
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
Would it make any difference that the second variable is a number? I tested it by removing the first variable, 'nameFull', and 'team' alone doesn't produce any results. So under no circumstance does it pass the team number to the second page, even though it clearly passes the team number 16 to the second page's URL. -
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
It's not getting the value for 'team'. -
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
I have two areas drawing information my database based on the variables passed from a Roster Page to a Profile Page. On the Profile Page, there are two queries, one in main/body and one in the sidebar. The main/body area is working. The sidebar isn't. Below the: echo $team produces nothing. Here is the page in question: http://eg10basketball.com/playerinfo/?nameFull=Evan-Borgman&team=16 Here is the error I'm getting: $team = $_GET['team']; echo $team; $query = 'SELECT * FROM a_players WHERE team= '. $team .' ORDER BY nameLast ASC'; $results = mysql_query($query); $count = 0; while($line = mysql_fetch_assoc($results)) { $count = $count+1; echo '<div><a href="http://eg10basketball.com/playerinfo?nameFull=' . $line['nameFirst'] . '-' . $line['nameLast'] . '">'. $line['nameFirst'] . ' ' . $line['nameLast'] .'</a><br></div>'; } -
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
I can't get any of it in there without getting the error. Which functions page? The one in my theme or the one in wp-includes? -
Passing two variables via URL but not able to GET one of them...
Jim R replied to Jim R's topic in Applications
Whenever I put that in functions.php, I get an error. Is it because I haven't done the second part? -
I'm creating this URL to pass variables to use from one Page to another: http://eg10basketball.com/playerinfo/?nameFull=Evan-Borgman&team=16 My WP site is seeing the first variable but not the second. After some searching I've found this suggestion, but it's not working for me: function add_query_vars_filter( $vars ) { $vars[] = "nameFull"; $vars[] = "team"; return $vars; } add_filter( 'query_vars', 'add_query_vars_filter' ); I tried putting this in the wp-includes/functions.php file of the, but ended up with a fatal error. I have since added it to my theme's functions.php file. There isn't an error, but it doesn't yield recognition of my second variable.
-
That would catch most of them from one season to the next and likely eliminate anyone re-registering simply to make a payment if they didn't pay the first time. I'll try that for next year. Thank you. For now, anyone have any help for my query for my issue now?
-
Problem is I don't ask for mobile numbers for every kid. Younger kids don't have it. Most families now don't really have or use home numbers, so I don't ask for it. Cities and schools would be too plentiful, especially since I get kids from three states.
-
There is no great way for me eliminate duplicates upon entry. I can't just use first name and last name, because sometimes we have kids with the same name. I can't really use their school because sometimes the parents just use the school name, other times they put HS after it or High School, etc. So from year to year I get a lot of duplicate entries into my database. The problem arises for me when a kid is registered but doesn't pay right away, so mom or dad return to the site to pay, and instead of just paying they re-register. I'm trying to eliminate those. Of course when that is the case, they generate a new ID so I started there: select * from fallLeague10 as f1 join fallLeague10 as f2 where f1.nameFirst = f2.nameFirst and f1.nameLast = f2.nameLast and f1.confirm='1' and f1.id <> f2.id order by f1.nameLast, f1.nameFirst (confirm = they entered this year) I really can't make sense of why it's producing the list that it is. I'm not really getting duplicates, maybe a couple, but there are definitely non-duplicates in that list. Basically, what I'm looking to get is 8-12 names that show up twice (or three times in one instance). It's a 470 person lot, and I just want to make sure I don't miss any because my numbers have to be exact or some kid ends up on two teams. I figure a query would be better than scrolling through my list.
-
Or how can I make this Update via a query: I have an email column joe@naccs.k12.in.us I'd like to have in the other email_acct column just naccs.k12.in.us
-
My primary method of working with my database is Sequel Pro (Mac OS X), and I'm trying to update a column in a table via a CSV import. I should be able to do it via Sequel's Import, but I keep getting errors. I've made sure I'm Updating and not Inserting. I've mapped my column (just one column), and it's just a one column CSV file. I get this error for each row: I messed with what each is terminated by, escaped by, enclosed by...etc...nothing changes. I get the same error, just at the end it's a different email account location. So I'll try to do it via a query, but I can't find a reliable solution to make it work. I could create a separate table and update via that way, but I can use this as a learning experience.
-
Never mind, I found my solution. I tried to edit my post, but too much time had past. Thank you.
-
I'm searching for complex order by queries. Is this an issue where "case" would work?
-
Here is the query: $query = 'SELECT * FROM a_playerRank WHERE year="2015" and position="1" and grouping<4 ORDER BY grouping DESC,rankPos,region,nameLast'; I have three groups (grouping). The first group is based on their ranking 1-10 or 1-15. (working fine) The second group is supposed to be alphabetical based on last name. (not working) The third group is supposed to be based on region, then alphabetically by their last name, and I have a header for each region. (working fine) I attached an image of grouping two and three. Group two (top group in the picture) isn't alphabetical. I know why the query isn't producing what I want, but I can't figure out the query I need to get my list to show as I described it. It shows the second group ordered by region then last name, just without headers. When I flip region and nameLast in the order by, the second group works great, but the third group basically produces a header for each kid (it looks like a mess). I assume there is a more complex query that will produce what I want.
-
I figured it out. Once I figured out a value was printing the single_tag_title instead of passing a value to $slug, I dug more into the WP template tag. It acts a little differently than WP hooks I have used in other areas.