Jump to content

wilsoc31

Members
  • Posts

    17
  • Joined

  • Last visited

wilsoc31's Achievements

Member

Member (2/5)

0

Reputation

  1. so @Barand i switched to use the simple dom but for some reason im not getting the hperlink. do you have an idea? ive tried a few ways and researched but i keep getting the outer text "Links" but not the hyperlink <li> <span class="label"><i class="fas fa-link"></i>Links</span> <span class="texts"> <a href="https://playpass.com/robinson-girls-youth-softball-association" target="_blank" class="social-link" title="Robinson Girls Youth Softball Association Website"><i class="fas fa-globe"></i></a> </span> </li> here is the code i tried: foreach($dom2->find('<li>') as $el2) { echo "test weblink2: "; print_r($el2->href); } but all i get is an empty line
  2. so doing include('simple_html_dom.php'); is better even reading a file? appreciate your responses btw
  3. quick question here.. can you not use preg_match_all to read a file.txt and parse it out? maybe i dont fully understand how preg_match_all works. i would have assumed that reg_match_all("@<tr><td(.+)</td></tr>@", $html, $matches); $listItems = $matches[1]; would have parsed out the <tr><td> tags out of this file <tr> <td data-title='Tournament'><a href='https://some website.com'>Midwest Championship</a></td> <td data-title='Location'>Rantoul, Illinois</td> <td data-title='Organization'>Rock Tournaments</td> <td data-title='GG'>4</td> <td data-title='Start Date'>04-19-2024</td> <td data-title='End Date'>04-21-2024</td> <td data-title='Age Groups'>10U, 12U, 14U</td> </tr> <tr> <td data-title='Tournament'><a href='https://some website.com'>FAST PITCH SLUGFEST</a></td> <td data-title='Location'>West Chicago, Illinois</td> <td data-title='Organization'>Seminole Sports Softball</td> <td data-title='GG'>4</td> <td data-title='Start Date'>04-19-2024</td> <td data-title='End Date'>04-21-2024</td> <td data-title='Age Groups'>10U, 12U, 14U</td> </tr> </tr> but i get empty results. thanks
  4. ok, i can try that. thank you so much for your help. i noticed this way it removes the hyperlink under the first column. is there an easy way to keep the hyperlink too? im trying different solutions on google but not finding anything useful. thanks again
  5. thank you that helped! should I be concerned about this warning? Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line: 4 this is the line: $dom->loadHTML($htmlSection);
  6. if i had to guess, i dont have things installed to support that. is there another way? Fatal error: Uncaught Error: Call to undefined function str_get_html()
  7. get an error Warning: include(): Failed opening 'simple_html_dom.php' for inclusion
  8. Thanks in advance for help. not sure what I'm doing wrong. ive read the documents and from my understanding of the function, i expected it to work. im trying to scrap from a page so i can make some changes systematically. I need to separate out each field inside of the <td> tags </td>. so the first thing i do is get a substr of the page so i know im getting the correct table. i store it and then do the preg_match_all . what i thought would work, inst parsing out the data fields inside the tags. $html = file_get_contents($url); $start_master = stripos($html, '<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="0">'); $end_master = stripos($html, '</table>', $start_master+10); // just get the entire table <table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="0"> to </table> $htmlSection = substr($html, $start_master , $length); preg_match_all('@<td style=(.+)</td>@', $htmlSection, $matches2); $listItems2 = $matches2[1]; $j = 0; while ($j < count($listItems2)) { echo "listItems2-1-".$j.": ".$listItems2[$j]."<br>"; $j++; } $htmlSection is: <table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="0"> <tr><td style="width: 275px;"><a href="/test1.html?ti=1327"><b><span style="color: #AB1717;">2023 NSA AUTUMN BY THE SEA - 1ST/2ND PLACE TEAMS WIN BOWNET PRIZE PACK </span></b></a></td><td style="width: 225px;">MAD BCH ROC/STARKEY RANCH</td><td style="width: 100px;">MAD BCH/TRINITY</td><td style="width: 15px;">2023-09-23</td><td style="width: 15px;">2023-09-24</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1326"><b><span style="color: #AB1717;">2023 NSA LIGHT OF AUBRIEN SCHOLARSHIP TOURNAMENT</span></b></a></td><td style="width: 225px;">BLACKSTONE PARK</td><td style="width: 100px;">PALMETTO</td><td style="width: 15px;">2023-09-23</td><td style="width: 15px;">2023-09-24</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1328"><b><span style="color: #AB1717;">2023 NSA LADY BOMBERS LESLEY JOHNSON 4TH ANNUAL MEMORIAL TOURNAMENT - 4 SEED INTO SINGLE ELIM</span></b></a></td><td style="width: 225px;">EC MOORE/NEW TAMPA COMM PARK</td><td style="width: 100px;">CLEARWATER/NEW TAMPA</td><td style="width: 15px;">2023-09-30</td><td style="width: 15px;">2023-10-01</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1329"><b><span style="color: #AB1717;">2023 NSA BATTLE FOR THE DOLLAR - WIN $$$ - EVERY TEAM WILL HAVE A CHANCE TO WIN CASH!</span></b></a></td><td style="width: 225px;">STARKEY RANCH</td><td style="width: 100px;">TRINITY</td><td style="width: 15px;">2023-10-07</td><td style="width: 15px;">2023-10-08</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1330"><b><span style="color: #AB1717;">2023 NSA/ST LEO REP THE ROAR TOURNAMENT - 1ST PLACE WINS BUSCH GARDENS SEASON PASSES!</span></b></a></td><td style="width: 225px;">EC MOORE/MAD BCH ROC</td><td style="width: 100px;">CLEARWATER/MAD BCH</td><td style="width: 15px;">2023-10-14</td><td style="width: 15px;">2023-10-15</td><td style="width: 50px;">8U - 14U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1331"><b><span style="color: #AB1717;">2023 NSA/ST LEO REVERSE EXPOSURE INVITATIONAL</span></b></a></td><td style="width: 225px;">EC MOORE</td><td style="width: 100px;">CLEARWATER</td><td style="width: 15px;">2023-10-14</td><td style="width: 15px;">2023-10-15</td><td style="width: 50px;">14U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1333"><b><span style="color: #AB1717;">2023 NSA KING OF THE HILL - 3 SEED INTO DOUBLE ELIM - 1ST PLACE WINS HOWL-O-SCREAM TICKETS!!</span></b></a></td><td style="width: 225px;">EC MOORE/MAD BCH ROC</td><td style="width: 100px;">CLEARWATER/MAD BCH</td><td style="width: 15px;">2023-10-21</td><td style="width: 15px;">2023-10-22</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1332"><b><span style="color: #AB1717;">2023 NSA PALMETTO SCARED HITLESS - 1ST PLACE WINS HOWL-O-SCREAM TICKETS!!</span></b></a></td><td style="width: 225px;">BLACKSTONE PARK</td><td style="width: 100px;">PALMETTO</td><td style="width: 15px;">2023-10-21</td><td style="width: 15px;">2023-10-22</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1334"><b><span style="color: #AB1717;">2023 NSA BOMBERWEEN - COSTUME CONTEST - PUMPKIN PRIZES!!</span></b></a></td><td style="width: 225px;">EC MOORE</td><td style="width: 100px;">CLEARWATER</td><td style="width: 15px;">2023-10-28</td><td style="width: 15px;">2023-10-29</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1335"><b><span style="color: #AB1717;">2023 NSA 13TH ANNUAL PITCH FOR THE CURE - OVER 80 TEAMS LAST YR - 4 SEED/SINGLE ELIM!</span></b></a></td><td style="width: 225px;">EC MOORE</td><td style="width: 100px;">CLEARWATER</td><td style="width: 15px;">2023-11-04</td><td style="width: 15px;">2023-11-05</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1337"><b><span style="color: #AB1717;">2023 NSA FALL BRAWL - 1ST PLACE WINS BUSCH GARDENS TICKETS!!</span></b></a></td><td style="width: 225px;">555 COMPLEX</td><td style="width: 100px;">BARTOW</td><td style="width: 15px;">2023-11-11</td><td style="width: 15px;">2023-11-12</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1336"><b><span style="color: #AB1717;">2023 NSA FALL BRAWL - 3 SEED INTO DOUBLE ELIMINATION!!</span></b></a></td><td style="width: 225px;">STARKEY RANCH</td><td style="width: 100px;">TRINITY</td><td style="width: 15px;">2023-11-11</td><td style="width: 15px;">2023-11-12</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1338"><b><span style="color: #AB1717;">2023 NSA BATTERBALL TURKEYFEST - DOUBLE/DOUBLE - 1ST & 2ND PLACE WIN NEW GLOVES!!</span></b></a></td><td style="width: 225px;">BLACKSTONE PARK</td><td style="width: 100px;">PALMETTO</td><td style="width: 15px;">2023-11-18</td><td style="width: 15px;">2023-11-19</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1339"><b><span style="color: #AB1717;">2023 NSA BATTERBALL TURKEYFEST - DOUBLE/DOUBLE - 1ST & 2ND PLACE WIN NEW GLOVES!!</span></b></a></td><td style="width: 225px;">MAD BCH ROC/STARKEY RANCH</td><td style="width: 100px;">MAD BCH/TRINITY</td><td style="width: 15px;">2023-11-18</td><td style="width: 15px;">2023-11-19</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1340"><b><span style="color: #AB1717;">2023 NSA THANKSGIVING THROWDOWN - 1 DAY/SUNDAY ONLY EVENT!!</span></b></a></td><td style="width: 225px;">NEW TAMPA COMM PARK</td><td style="width: 100px;">NEW TAMPA</td><td style="width: 15px;">2023-11-26</td><td style="width: 15px;">2023-11-26</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1341"><b><span style="color: #AB1717;">2023 NSA TOYS FOR TOTS #1 - 1ST & 2ND PLACE WIN NEW GLOVES!!</span></b></a></td><td style="width: 225px;">MADEIRA BEACH ROC</td><td style="width: 100px;">MADEIRA BEACH</td><td style="width: 15px;">2023-12-02</td><td style="width: 15px;">2023-12-03</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1342"><b><span style="color: #AB1717;">2023 NSA FALL STATE CHAMPIONSHIPS - REDEEM THE $$ YOU EARNED EACH TOURNAMENT THIS FALL!!</span></b></a></td><td style="width: 225px;">MULTIPLE VENUES</td><td style="width: 100px;">POLK COUNTY</td><td style="width: 15px;">2023-12-09</td><td style="width: 15px;">2023-12-10</td><td style="width: 50px;">8U - 18U</td></tr><tr><td style="width: 275px;"><a href="/test1.html?ti=1343"><b><span style="color: #AB1717;">2023 NSA TOYS FOR TOTS #2 - CHANCE TO WIN SOME PRESENTS & COME MEET SANTA!!</span></b></a></td><td style="width: 225px;">NEW TAMPA COMM PARK</td><td style="width: 100px;">NEW TAMPA</td><td style="width: 15px;">2023-12-16</td><td style="width: 15px;">2023-12-17</td><td style="width: 50px;">8U - 18U</td></tr> </table> the output is: "width: 275px;">2023 NSA AUTUMN BY THE SEA - 1ST/2ND PLACE TEAMS WIN BOWNET PRIZE PACK MAD BCH ROC/STARKEY RANCHMAD BCH/TRINITY2023-09-232023-09-248U - 18U2023 NSA LIGHT OF AUBRIEN SCHOLARSHIP TOURNAMENTBLACKSTONE PARKPALMETTO2023-09-232023-09-248U - 18U2023 NSA LADY BOMBERS LESLEY JOHNSON 4TH ANNUAL MEMORIAL TOURNAMENT - 4 SEED INTO SINGLE ELIMEC MOORE/NEW TAMPA COMM PARKCLEARWATER/NEW TAMPA2023-09-302023-10-018U - 18U2023 NSA BATTLE FOR THE DOLLAR - WIN $$$ - EVERY TEAM WILL HAVE A CHANCE TO WIN CASH!STARKEY RANCHTRINITY2023-10-072023-10-088U - 18U2023 NSA/ST LEO REP THE ROAR TOURNAMENT - 1ST PLACE WINS BUSCH GARDENS SEASON PASSES!EC MOORE/MAD BCH ROCCLEARWATER/MAD BCH2023-10-142023-10-158U - 14U2023 NSA/ST LEO REVERSE EXPOSURE INVITATIONALEC MOORECLEARWATER2023-10-142023-10-1514U - 18U2023 NSA KING OF THE HILL - 3 SEED INTO DOUBLE ELIM - 1ST PLACE WINS HOWL-O-SCREAM TICKETS!!EC MOORE/MAD BCH ROCCLEARWATER/MAD BCH2023-10-212023-10-228U - 18U2023 NSA PALMETTO SCARED HITLESS - 1ST PLACE WINS HOWL-O-SCREAM TICKETS!!BLACKSTONE PARKPALMETTO2023-10-212023-10-228U - 18U2023 NSA BOMBERWEEN - COSTUME CONTEST - PUMPKIN PRIZES!!EC MOORECLEARWATER2023-10-282023-10-298U - 18U2023 NSA 13TH ANNUAL PITCH FOR THE CURE - OVER 80 TEAMS LAST YR - 4 SEED/SINGLE ELIM!EC MOORECLEARWATER2023-11-042023-11-058U - 18U2023 NSA FALL BRAWL - 1ST PLACE WINS BUSCH GARDENS TICKETS!!555 COMPLEXBARTOW2023-11-112023-11-128U - 18U2023 NSA FALL BRAWL - 3 SEED INTO DOUBLE ELIMINATION!!STARKEY RANCHTRINITY2023-11-112023-11-128U - 18U2023 NSA BATTERBALL TURKEYFEST - DOUBLE/DOUBLE - 1ST & 2ND PLACE WIN NEW GLOVES!!BLACKSTONE PARKPALMETTO2023-11-182023-11-198U - 18U2023 NSA BATTERBALL TURKEYFEST - DOUBLE/DOUBLE - 1ST & 2ND PLACE WIN NEW GLOVES!!MAD BCH ROC/STARKEY RANCHMAD BCH/TRINITY2023-11-182023-11-198U - 18U2023 NSA THANKSGIVING THROWDOWN - 1 DAY/SUNDAY ONLY EVENT!!NEW TAMPA COMM PARKNEW TAMPA2023-11-262023-11-268U - 18U2023 NSA TOYS FOR TOTS #1 - 1ST & 2ND PLACE WIN NEW GLOVES!!MADEIRA BEACH ROCMADEIRA BEACH2023-12-022023-12-038U - 18U2023 NSA FALL STATE CHAMPIONSHIPS - REDEEM THE $$ YOU EARNED EACH TOURNAMENT THIS FALL!!MULTIPLE VENUESPOLK COUNTY2023-12-092023-12-108U - 18U2023 NSA TOYS FOR TOTS #2 - CHANCE TO WIN SOME PRESENTS & COME MEET SANTA!!NEW TAMPA COMM PARKNEW TAMPA2023-12-162023-12-178U - 18U what i expected was something like this: 2023 NSA AUTUMN BY THE SEA - 1ST/2ND PLACE TEAMS WIN BOWNET PRIZE PACK MAD BCH ROC/STARKEY RANCH MAD BCH/TRINITY 2023-09-23 2023-09-24 8U - 18U [ ect to the next row ]
  9. does anyone know why this query isnt working? it would work i think ok in oracle so not sure what im doing wrong here... thanks in advance select * from pool_play where tournament_id = '3522' and user_id= '1' and (team_name is not null or team_name !='' or team_name NOT LIKE '%[teamname]%'); i would expect all the or's to work inside the () so obviously i would expect nulls to filter out, and also the NOT LIKE '%[teamname]% to filter out too
  10. let me step back and try again.. 1. this entire thing has been javascript from the start. I can tell its using some sort of array but im not super great at javascript. 2. I added the php parts as it was not storing the results other than cache in the array. it is storing the data just fine and also able to pull the data from the database as well. 3. if i left it as is from the original (javascript only) and if someone only did Team1 and Team2. walked away and came back to it later, it timed out and the cache is gone. this is why i wanted to store it on the database (which is why you now see php mixed in) 4. the code even though it saves and pulls from php/mysql, it still is looping through the cached array as the main driver but it starts over as it doesnt know where it left off. what i would like is to at minimum load the array each time from the database instead. currently it keeps scores of the teams, so i can do a query with something like: select * from table where score1 =null and score2 =null but im having trouble figuring out the array load part in javascript. Does this make more sense? and thank you for your help so far by the way
  11. I appreciate you asking. I'm having a hard time with the JavaScript part. I know what it's doing is looping through an array based on info provided, see image. The issue is the entire thing is looping through an array. Also in the array I'm inserting records to save them. Instead of the long array I want to pull from the database so it's no longer a cached issue
  12. Can anyone help me know how to convert this from javascript array? Currently it is running through an array which im not a fan of because since it runs in the array its cached memory that cant be saved as progress and return later. as you can see, i have some php and can save it off, but it still runs through the array instead. /* * Tournament Administration Sheet * * Copyright (C) 2008 Jan Gassen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ var groupCounter = 0; var finishCounter = 0; var allFinished = false; var modeConnector; var groupList = new Array(); var members = 0; function Connector(playerCounter, groupCounter) { this.table = document.createElement("table"); this.table.setAttribute("id", "playerInputWindow"); this.table.setAttribute("width", "450"); this.table.style.position = "absolute"; this.table.style.left = document.body.clientWidth / 2 - 125; this.table.style.top = "30"; this.groups = groupCounter; var instance = this; this.table.style.display = "none"; var tbody = document.createElement("tbody"); this.table.appendChild(tbody); this.dropDown = document.createElement("select"); for (var x = 0; x < members; x++) { var option = document.createElement("option"); //option.text = (x + 1) + " Player"; option.text = (x + 1) + " Team"; option.value = x + 1; this.dropDown.options.add(option); } this.modes = document.createElement("select"); var opt1 = document.createElement("option"); opt1.text = "Single Elimination"; opt1.value = "ko.html"; this.modes.options.add(opt1); var opt2 = document.createElement("option"); opt2.text = "Double Elimination"; opt2.value = "dko.html"; this.modes.options.add(opt2); this.partner = document.createElement("select"); /* var opt1 = document.createElement("option"); opt1.text = "als DYP"; opt1.value = "1"; this.partner.options.add(opt1); */ var opt2 = document.createElement("option"); opt2.text = "als Teams"; opt2.value = "0"; this.partner.options.add(opt2); var btn = document.createElement("input"); btn.type = "button"; btn.value = "Next"; btn.onclick = function () { Connector.prototype.go(instance); }; var btn2 = document.createElement("input"); btn2.type = "button"; btn2.value = "Cancel"; btn2.onclick = function () { Connector.prototype.stop(instance); }; this.setInput = document.createElement("input"); this.setInput.type = "text"; this.setInput.value = "1"; this.setInput.size = "2"; this.setInput.setAttribute("MAXLENGTH", "1"); this.shuffleInput = document.createElement("input"); this.shuffleInput.type = "checkbox"; var row = this.table.insertRow(0); var cell = row.insertCell(0); cell.setAttribute("colspan", "2"); cell.setAttribute("valign", "middle"); cell.innerHTML = "<div id='popupTitle'><table><tr><td>Continue...</td></tr></table></div>"; row = this.table.insertRow(1); cell = row.insertCell(0); cell.setAttribute("colspan", "2"); cell.innerHTML = "Time for bracket play:"; // Row 2 row = tbody.insertRow(2); cell = row.insertCell(0); cell.innerHTML = "Continue with: "; cell = row.insertCell(1); cell.appendChild(this.modes); // Row 3 row = tbody.insertRow(3); cell = row.insertCell(0); cell.innerHTML = "How many teams: "; cell = row.insertCell(1); cell.appendChild(this.dropDown); // Row 4 row = tbody.insertRow(4); cell = row.insertCell(0); cell = row.insertCell(1); cell.appendChild(this.partner); // Row 5 row = tbody.insertRow(5); cell = row.insertCell(0); cell.innerHTML = "Profit rates: "; cell = row.insertCell(1); cell.appendChild(this.setInput); // Row 6 row = tbody.insertRow(6); cell = row.insertCell(0); cell.innerHTML = "Losing round shuffle?"; cell = row.insertCell(1); cell.appendChild(this.shuffleInput); // Row 7 row = tbody.insertRow(7); cell = row.insertCell(0); cell.appendChild(btn2); cell = row.insertCell(1); cell.appendChild(btn); } Connector.prototype.show = function () { this.table.style.display = "block"; document.getElementById("dimmer").style.display = "block"; document.getElementById("dimmer").style.width = document.body.clientWidth + "px"; document.getElementById("dimmer").style.height = (document.body.scrollHeight || document.body.offsetHeight) + "px"; } Connector.prototype.get = function () { return this.table; } Connector.prototype.stop = function (instance) { instance.table.style.display = "none"; document.getElementById("dimmer").style.display = "none"; } Connector.prototype.go = function (instance) { pageUrl = instance.modes.options[instance.modes.selectedIndex].value; pageTxt = instance.modes.options[instance.modes.selectedIndex].text; player = instance.dropDown.options[instance.dropDown.selectedIndex].value; top.GLOBALS["teams"] = instance.groups * parseInt(player); top.GLOBALS["sets"] = parseInt(instance.setInput.value); top.GLOBALS["groups"] = 1; top.GLOBALS["modeVal"] = pageUrl; top.GLOBALS["modeTxt"] = pageTxt; top.GLOBALS["shuffleLooser"] = instance.shuffleInput.checked; var list = new Array(); var len = groupList.length; for (var i = 0; i < len; i++) { var grp = groupList[i]; var teams = grp.getTeams(); for (var j = 0; (j < teams.length && j < parseInt(player)); j++) { list.push(teams[j][0]); } } top.GLOBALS["playerList"] = list; top.GLOBALS["dyp"] = instance.partner.options[instance.partner.selectedIndex].value; top.FILL_FROM_GRP = true; window.location = pageUrl; } function Score(size) { this.rows = new Array(); this.size = size; this.data; this.table = document.createElement("table"); this.table.setAttribute("border", "0"); this.table.setAttribute("width", "100%"); this.table.setAttribute("cellspacing", "0"); this.table.setAttribute("cellpadding", "2"); var tbody = document.createElement("tbody"); this.table.appendChild(tbody); this.table.style.display = "none"; this.table.style.cursor = "pointer"; var row = tbody.insertRow(0); this.detailCell = row.insertCell(0); this.detailCell.setAttribute("width", "100%"); this.detailCell.setAttribute("class", "groupDetail"); this.detailCell.colSpan = "4"; this.detailCell.innerHTML="&nbsp;"; this.detailCell.style.display = "none"; this.detailCell.onclick = function () { this.style.display = "none"; } var instance = this; var x = 1; for (x = 1; x <= size; x++) { var row = tbody.insertRow(x); row.setAttribute("id", x-1); row.onclick = function () { Score.prototype.detail(this.id, instance); }; if (x % 2) { row.setAttribute("class", "odd"); } else { row.setAttribute("class", "even"); } var cellName = row.insertCell(0); var cellPoints = row.insertCell(1); cellPoints.setAttribute("align", "right"); var cellGames = row.insertCell(2); cellGames.setAttribute("align", "right"); var cellDiff = row.insertCell(3); cellDiff.setAttribute("align", "right"); this.rows.push(new Array(cellName, cellPoints, cellGames, cellDiff)); } } Score.prototype.diff = function (id) { var val = this.data[id][6] - this.data[id][7]; if (val > 0) { val = "+" + val; } return val; } Score.prototype.detail = function (id, instance) { instance.detailCell.style.display = "table-cell"; instance.detailCell.innerHTML = "<div><b>" + instance.data[id][0] + "</b><br>"; instance.detailCell.innerHTML += "Points: " + instance.data[id][1] + "<br>"; instance.detailCell.innerHTML += "Games: " + instance.data[id][2] + "<br>"; instance.detailCell.innerHTML += "S/U/N: " + instance.data[id][3] + "/" + instance.data[id][4] + "/" + instance.data[id][5] + "<br>"; instance.detailCell.innerHTML += "Goals: " + instance.data[id][6] + ":" + instance.data[id][7] + " Diff: " + (instance.diff(id)) + "</div>"; } Score.prototype.set = function (scores) { this.data = scores; for (var x = 0; x < this.rows.length; x++) { var row = this.rows[x]; row[0].innerHTML = scores[x][0]; row[1].innerHTML = scores[x][1]; row[2].innerHTML = scores[x][2]; row[3].innerHTML = this.diff(x); } } Score.prototype.show = function () { this.table.style.display = "table"; } Score.prototype.hide = function () { this.table.style.display = "none"; } Score.prototype.get = function () { return this.table; } var groupMap = new Array(); function Group(size, id, matches) { this.teams = new Array(); this.games = new Array(); this.scores = new Array(); this.size = size; this.scoreTable = new Score(size); var instance = this; this.table = this.create(size, id, instance); this.innerTable; this.historyCell; this.player1name; this.player1points; this.player2name; this.player2points; this.id = id; this.gameCounter = 0; this.isFinish = false; this.showHistory = false; this.history = ""; groupMap["Group_"+id] = new Array(); groupCounter++; for (var i = 0; i < matches; i++) { this.createGames(size); } } Group.prototype.showAllGames = function() { var allGames = ""; let text; for (var x = this.gameCounter; x < this.games.length; x++) { var id1 = this.games[x][0]; var id2 = this.games[x][1]; var name1 = this.teams[id1][0].value; var name2 = this.teams[id2][0].value; //allGames += name1 + " - " + name2 + "<br>"; // allGames += "all games - all games2 <br>"; //insert records into the database for all the games var xmlhttp; if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); else xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // alert('inserting data..' ); xmlhttp.open('GET',"save_pool_history.php?action=insert&history=" + name1 + "|||" + name2, true); xmlhttp.send(); } fetch('save_pool_history.php?action=select_future').then((response)=>{ if (!response.ok) { throw new Error('Invalid Response'); } return response.text(); }).then((text)=>{ // alert('2nd alert' ); allGames = text; alert('allGames1: ' + allGames); // alert('1st alert' + text); // alert('1-2 alert' + this.history); }).catch((error)=>{ alert('Error fetching response.'); }); alert('allGames2: ' + allGames); return allGames; } Group.prototype.shuffle = function () { this.games.sort(function() { return 0.5 - Math.random(); }); } Group.prototype.createGames = function (size) { for (var x = 0; x < size; x++) { for (var y = x+1; y < size; y++) { this.games.push(new Array(x, y)); } } this.shuffle(); } Group.prototype.sort = function () { this.scores.sort(function(a, b) { return (b[6] - b[7]) - (a[6] - a[7]); }); this.scores.sort(function(a, b) { return (a[5] - b[5]); }); this.scores.sort(function(a, b) { return (b[3] - a[3]); }); this.scores.sort(function(a, b) { return (b[1] - a[1]); }); } let teama; let teamb; let myarr; Group.prototype.refresh = function () { var player1id = this.games[this.gameCounter][0]; var player2id = this.games[this.gameCounter][1]; fetch('save_pool_history.php?action=select_current').then((response)=>{ if (!response.ok) { throw new Error('Invalid Response'); } return response.text(); }).then((text)=>{ // alert('text before split: ' + text ); myarr = text.split("|||"); teama=myarr[0]; teamb=myarr[1]; // this.player1name.setAttribute("value",teama); // this.player2name.setAttribute("value",teamb); // alert('team1: '+ teama); // alert('team2: '+ teamb); // alert('1st alert' + text); // alert('1-2 alert' + this.history); }).catch((error)=>{ alert('Error fetching games history.'); }); alert('team1-2: '+ teama); // alert('team2-2: '+ teamb); this.player1name.setAttribute("value", teama ); this.player2name.setAttribute("value", teamb ); if ("" !== this.player1points.value && "" !== this.player2points.value) { var score1 = parseInt(this.player1points.value); var score2 = parseInt(this.player2points.value); if (score1 == score2) { this.teams[player1id][1].value = parseInt(this.teams[player1id][1].value) + 1; this.teams[player2id][1].value = parseInt(this.teams[player2id][1].value) + 1; this.teams[player1id][4].value = parseInt(this.teams[player1id][4].value) + 1; this.teams[player2id][4].value = parseInt(this.teams[player2id][4].value) + 1; } else if (score1 > score2) { this.teams[player1id][1].value = parseInt(this.teams[player1id][1].value) + 3; this.teams[player1id][3].value = parseInt(this.teams[player1id][3].value) + 1; this.teams[player2id][5].value = parseInt(this.teams[player2id][5].value) + 1; } else { this.teams[player2id][1].value = parseInt(this.teams[player2id][1].value) + 3; this.teams[player1id][5].value = parseInt(this.teams[player1id][5].value) + 1; this.teams[player2id][3].value = parseInt(this.teams[player2id][3].value) + 1; } this.teams[player1id][2].value = parseInt(this.teams[player1id][2].value) + 1; this.teams[player2id][2].value = parseInt(this.teams[player2id][2].value) + 1; this.teams[player1id][6].value = parseInt(this.teams[player1id][6].value) + score1; this.teams[player2id][6].value = parseInt(this.teams[player2id][6].value) + score2; this.teams[player1id][7].value = parseInt(this.teams[player1id][7].value) + score2; this.teams[player2id][7].value = parseInt(this.teams[player2id][7].value) + score1; this.player1points.value = ""; this.player2points.value = ""; //setup the new object var xmlhttp; if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); else xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //this.history += this.teams[player1id][0].value + " - " + this.teams[player2id][0].value + " " + score1 + ":" + score2 + "<br>"; // this.history += "teamab - teambb " + score1 + ":" + score2 + "<br>"; fetch('save_pool_history.php?action=select_past').then((response)=>{ if (!response.ok) { throw new Error('Invalid Response'); } return response.text(); }).then((text)=>{ // alert('2nd alert' ); this.history = text; let tourny_past = text; // alert('1st alert' + text); // alert('1-2 alert' + this.history); }).catch((error)=>{ alert('Error fetching games history.'); }); // alert('2nd alert' ); // this.history = text; // alert('tournypast' + tourny_past); //insert records into the database for all the games xmlhttp.open('GET',"save_pool_history.php?action=update&history=" + this.teams[player1id][0].value + "|||" + this.teams[player2id][0].value + "|||" + score1 + "|||" + score2, true); xmlhttp.send(); // window.location.href("save_pool_history.php?history=" + this.teams[player1id][0].value + " - " + this.teams[player2id][0].value + " " + score1 + ":" + score2); this.calculate(); this.next(); this.refresh(); } this.sort(); this.scoreTable.set(this.scores); if (this.showHistory) { this.historyCell.innerHTML ="<div><table><tr><td align='right'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button type='button'>OK</button></td></tr></table></div>"+ "<div id=\"history_title\">History:</div>" + "<div id=\"history_past\">" + this.history + "</div>" + // 441,489 "<div id=\"history_future\">"+ this.showAllGames() + "</div>"; // 373 } else { this.historyCell.innerHTML = "<div><table><tr><td align='right'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button type='button'>OK</button></td></tr></table></div>"+ "Show History"; } } Group.prototype.finish = function () { this.player1points.disabled = true; this.player1name.disabled = true; this.player2points.disabled = true; this.player2name.disabled = true; this.isFinish = true; finishCounter++; } Group.prototype.next = function () { if (this.gameCounter >= this.games.length - 1) { this.finish(); } else { this.gameCounter++; } if (finishCounter == groupCounter) { modeConnector.show(); } } Group.prototype.onchange = function (instance) { instance.refresh(); } Group.prototype.calculate = function () { this.scores = new Array(); for (var x = 0; x < this.size; x++) { var name = this.teams[x][0].value var score = this.teams[x][1].value var nog = this.teams[x][2].value; var wins = this.teams[x][3].value; var ties = this.teams[x][4].value; var loose = this.teams[x][5].value; var goals = this.teams[x][6].value; var caughts = this.teams[x][7].value; this.scores.push(new Array(name, score, nog, wins, ties, loose, goals, caughts)); } } Group.prototype.button = function (box, instance) { if(box.checked) { instance.calculate(); instance.scoreTable.show(); instance.hide(); } else { instance.scoreTable.hide(); instance.show(); } instance.refresh(); } Group.prototype.show = function () { this.innerTable.style.display = "block"; } Group.prototype.hide = function () { this.innerTable.style.display = "none"; } Group.prototype.create = function (size, id, instance) { var table = document.createElement("table"); table.setAttribute("border", "0"); table.setAttribute("id", "machbox"); var tbody = document.createElement("tbody"); table.appendChild(tbody); var row = tbody.insertRow(0); var cell = row.insertCell(0); cell.setAttribute("id", "marker"); cell.setAttribute("colspan", "2"); cell.innerHTML = "Pool " + id; var row = tbody.insertRow(1); var cell = row.insertCell(0); cell.setAttribute("colspan", "2"); cell.appendChild(this.scoreTable.get()); var row = tbody.insertRow(2); var cell = row.insertCell(0); cell.setAttribute("colspan", "2"); var offset = 3; this.innerTable = document.createElement("table"); var innerBody = document.createElement("tbody"); this.innerTable.appendChild(innerBody); cell.appendChild(this.innerTable); for (var x = 0; x < size; x++) { var row = innerBody.insertRow(x); row.setAttribute("valign", "middle"); var cellName = row.insertCell(0); var teamInput = document.createElement("input"); teamInput.setAttribute("type", "text"); teamInput.setAttribute("size", "64"); teamInput.setAttribute("id", "team_" + id + "_input_" + x); teamInput.onchange = function() { Group.prototype.onchange (instance); } cellName.appendChild(teamInput); var cellPoints = row.insertCell(1); var pointInput = document.createElement("input"); pointInput.setAttribute("type", "text"); pointInput.setAttribute("size", "2"); pointInput.setAttribute("maxlength", "2"); pointInput.setAttribute("value", "0"); pointInput.setAttribute("id", "result_" + id + "_input_" + x); pointInput.onchange = function() { Group.prototype.onchange (instance); } cellPoints.appendChild(pointInput); var gamesInput = document.createElement("input"); gamesInput.setAttribute("value", "0"); gamesInput.setAttribute("id", "games_" + id + "_input_" + x); var winInput = document.createElement("input"); winInput.setAttribute("value", "0"); winInput.setAttribute("id", "win_" + id + "_input_" + x); var tieInput = document.createElement("input"); tieInput.setAttribute("value", "0"); tieInput.setAttribute("id", "tie_" + id + "_input_" + x); var looseInput = document.createElement("input"); looseInput.setAttribute("value", "0"); looseInput.setAttribute("id", "loose_" + id + "_input_" + x); var goalsInput = document.createElement("input"); goalsInput.setAttribute("value", "0"); goalsInput.setAttribute("id", "goals_" + id + "_input_" + x); var caughtsInput = document.createElement("input"); caughtsInput.setAttribute("value", "0"); caughtsInput.setAttribute("id", "caughts_" + id + "_input_" + x); this.teams.push(new Array(teamInput, pointInput, gamesInput, winInput, tieInput, looseInput, goalsInput, caughtsInput)); } this.calculate(); var row = tbody.insertRow(offset); var cell = row.insertCell(0); cell.setAttribute("colspan", "2"); var chkbox = document.createElement('input'); chkbox.setAttribute("type", "checkbox"); chkbox.onchange = function () { Group.prototype.button (this, instance); } cell.appendChild(chkbox); var row = tbody.insertRow(1 + offset); var cell = row.insertCell(0); cell.setAttribute("id", "marker"); cell.setAttribute("colspan", "2"); cell.innerHTML = "Current Game:"; var row = tbody.insertRow(2 + offset); var cell = row.insertCell(0); this.player1name = document.createElement("input"); this.player1name.setAttribute("type", "text"); this.player1name.setAttribute("size", "60"); cell.appendChild(this.player1name); var cell = row.insertCell(1); this.player1points = document.createElement("input"); this.player1points.setAttribute("type", "text"); this.player1points.setAttribute("size", "2"); this.player1points.setAttribute("maxlength", "2"); this.player1points.onchange = function() { Group.prototype.onchange (instance); } cell.appendChild(this.player1points); var row = tbody.insertRow(3 + offset); var cell = row.insertCell(0); this.player2name = document.createElement("input"); this.player2name.setAttribute("type", "text"); this.player2name.setAttribute("size", "60"); cell.appendChild(this.player2name); var cell = row.insertCell(1); this.player2points = document.createElement("input"); this.player2points.setAttribute("type", "text"); this.player2points.setAttribute("size", "2"); this.player2points.setAttribute("maxlength", "2"); this.player2points.onchange = function() { Group.prototype.onchange (instance); } cell.appendChild(this.player2points); var row = tbody.insertRow(4 + offset); this.historyCell = row.insertCell(0); this.historyCell.setAttribute("colspan", "2"); this.historyCell.setAttribute("class", "history"); this.historyCell.innerHTML = "Start / View History"; this.historyCell.onclick = function() { Group.prototype.toggleHistory (instance); } return table; } Group.prototype.getTeams = function () { return this.scores; } Group.prototype.toggleHistory = function (instance) { instance.showHistory = !instance.showHistory; instance.refresh(); } Group.prototype.get = function () { return this.table; } function createTable(player, groups, matches) { var table = document.createElement("table"); var tbody = document.createElement("tbody"); table.appendChild(tbody); table.setAttribute("border", "0"); table.setAttribute("width", "100%"); table.setAttribute("id", "sheet"); var size = Math.ceil(Math.sqrt(groups)); members = Math.ceil(player / groups); var counter = 1; for(var line = 0; line < size; line++) { var row = tbody.insertRow(line); row.setAttribute("valign", "top"); for (var x = 0; x < size; x++) { var cell = row.insertCell(x); cell.setAttribute("align", "center"); if (counter <= groups) { var groupInstance = new Group(members, counter, matches); groupList.push(groupInstance); cell.appendChild(groupInstance.get()); } counter++; } } document.body.appendChild(table); modeConnector = new Connector(player, groups); document.body.appendChild(modeConnector.get()); } The php it is calling is saving (inserting into tables) and also getting data by doing a select but its still using the array and can be out of sync. any help would be appriciated.
  13. Any help would be appreciated here.. im not sure what im doing wrong, ive researched but cant seem to find the solution... so i have java code that is running and im trying to call a php to get a return. for some reason my return (this.responseText) is empty. i also get all 3 alerts so i know its hitting that code var xmlhttp; if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); else xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.onload = function() { if (this.readyState == 4 && this.status == 200) { this.history += this.responseText; alert('alert1: '+ this.responseText); } }; alert('alert2: '+ this.responseText); xmlhttp.open('GET',"save_pool_history.php?action=select_past", true); xmlhttp.send(); alert('alert3: '+ this.responseText); here is the php code.. from what i read, a simple echo should return results.. it does go into the function, i have the log output showing it does. also i dont want to do it inside a div tag if that is possible. <?php session_start(); if($_GET['action'] == "select_past") { output_and_log( " action: ".$_GET['action']. " select team1 , team2, team1score, team2score from pool_play_history where games_id= '".$_SESSION['bracket_id']."' and user_id = '".$_SESSION["userId"]."' and team1score is not null and team2score is not null", "log","save_pool_history", "INFO", $myFile2); // query for later after i get the simple echo to work.... //$pquery =mysqli_query($con,"select team1 , team2, team1score, team2score from pool_play_history where games_id= '".$_SESSION['bracket_id']."' and user_id = '".$_SESSION["userId"]."' and team1score is not nulal and team2score is not null"); output_and_log( " after query select past", "log","save_pool_history", "INFO", $myFile2); echo "past1 - past2 9:8<br>"; } ?>
  14. Can someone please help me? i cant quite figure out how to parse out the following json data: {"data":[{"id":2464,"vehiclemodel_id":969,"vehicleyear_id":39,"created_at":"2016-10-10 14:51:02","updated_at":"2016-10-10 14:51:02","attributevalues":{"data":[]},"items":{"data":[{"id":389,"brand_id":406,"country_id":227,"product_id":6,"sku":"015-01003","name":"MULTIRATE FORK SPRINGS 41MM","list_price":"126.95","standard_dealer_price":"88.99","supplier_product_id":"FS-1028","length":24.5,"width":4.7,"height":1.9,"weight":3.42,"upc":null,"superseded_sku":null,"status_id":"STK","status":"STK","unit_of_measurement_id":null,"has_map_policy":false,"sort":0,"created_at":"2016-06-17 20:47:51","updated_at":"2022-01-03 17:39:04","published_at":"2016-06-17 20:47:51","images":{"data":[{"id":94477,"domain":"cdn.wpsstatic.com\/","path":"images\/","filename":"88ff-5b02f15f8c0b7.jpg","alt":null,"mime":"image\/jpeg","width":5419,"height":3473,"size":6496067,"signature":"2f99154396b9412e1a0db1c10f29fdf1fc989f9db8236efdb28d52341a445405","created_at":"2018-05-21 16:18:46","updated_at":"2018-05-21 16:18:46"}]}},{"id":394,"brand_id":406,"country_id":227,"product_id":263235,"sku":"015-01012","name":"LOWERING FORK SPRINGS 41MM","list_price":"139.95","standard_dealer_price":"98.99","supplier_product_id":"LK-2011","length":24.5,"width":4.5,"height":1.7,"weight":3.43,"upc":null,"superseded_sku":null,"status_id":"STK","status":"STK","unit_of_measurement_id":null,"has_map_policy":false,"sort":0,"created_at":"2016-06-17 20:47:51","updated_at":"2022-01-03 17:39:05","published_at":"2016-06-17 20:47:51","images":{"data":[{"id":174,"domain":"cdn.wpsstatic.com\/","path":"images\/","filename":"becb-572a4ec444772.jpg","alt":null,"mime":"image\/jpeg","width":1000,"height":447,"size":138779,"signature":"dc570b1218a024f1acf9dd4b39fc6e7ea2a12d64fae46622e2a25d85e31d8d76","created_at":"2016-05-04 19:34:28","updated_at":"2017-02-23 18:01:01"}]}},{"id":634992,"brand_id":434,"country_id":227,"product_id":185661,"sku":"810-0607","name":"BRAKE PEDAL COVER TOURING BAD AXE BLACK","list_price":"99.00","standard_dealer_price":"69.30","supplier_product_id":"BAX-340-BLK","length":7,"width":5,"height":1,"weight":1,"upc":null,"superseded_sku":null,"status_id":"NEW","status":"NEW","unit_of_measurement_id":12,"has_map_policy":true,"sort":0,"created_at":"2022-04-13 07:53:11","updated_at":"2022-05-16 07:31:54","published_at":"2022-05-16 07:31:54","images":{"data":[]}}]},"vehiclemodel":{"data":{"id":969,"vehiclemake_id":22,"db2_key":"193","name":"FLSTF Softail Fat Boy","created_at":"2016-10-10 14:47:50","updated_at":"2018-04-11 17:43:23","vehiclemake":{"data":{"id":22,"db2_key":"HARLEY","name":"Harley-Davidson","created_at":"2016-10-10 14:47:14","updated_at":"2021-12-22 17:44:31"}}}},"vehicleyear":{"data":{"id":39,"name":1993,"created_at":"2016-10-10 14:50:07","updated_at":"2016-10-10 14:50:07"}}}],"meta":{"cursor":{"current":"61poYD9eaDkR","prev":null,"next":null,"count":1}}} here is where it is also layed out differently: { "data": [ { "id": 2464, "vehiclemodel_id": 969, "vehicleyear_id": 39, "created_at": "2016-10-10 14:51:02", "updated_at": "2016-10-10 14:51:02", "attributevalues": { "data": [] }, "items": { "data": [ { "id": 389, "brand_id": 406, "country_id": 227, "product_id": 6, "sku": "015-01003", "name": "MULTIRATE FORK SPRINGS 41MM", "list_price": "126.95", "standard_dealer_price": "88.99", "supplier_product_id": "FS-1028", "length": 24.5, "width": 4.7, "height": 1.9, "weight": 3.42, "upc": null, "superseded_sku": null, "status_id": "STK", "status": "STK", "unit_of_measurement_id": null, "has_map_policy": false, "sort": 0, "created_at": "2016-06-17 20:47:51", "updated_at": "2022-01-03 17:39:04", "published_at": "2016-06-17 20:47:51", "images": { "data": [ { "id": 94477, "domain": "cdn.wpsstatic.com/", "path": "images/", "filename": "88ff-5b02f15f8c0b7.jpg", "alt": null, "mime": "image/jpeg", "width": 5419, "height": 3473, "size": 6496067, "signature": "2f99154396b9412e1a0db1c10f29fdf1fc989f9db8236efdb28d52341a445405", "created_at": "2018-05-21 16:18:46", "updated_at": "2018-05-21 16:18:46" } ] } }, { "id": 394, "brand_id": 406, "country_id": 227, "product_id": 263235, "sku": "015-01012", "name": "LOWERING FORK SPRINGS 41MM", "list_price": "139.95", "standard_dealer_price": "98.99", "supplier_product_id": "LK-2011", "length": 24.5, "width": 4.5, "height": 1.7, "weight": 3.43, "upc": null, "superseded_sku": null, "status_id": "STK", "status": "STK", "unit_of_measurement_id": null, "has_map_policy": false, "sort": 0, "created_at": "2016-06-17 20:47:51", "updated_at": "2022-01-03 17:39:05", "published_at": "2016-06-17 20:47:51", "images": { "data": [ { "id": 174, "domain": "cdn.wpsstatic.com/", "path": "images/", "filename": "becb-572a4ec444772.jpg", "alt": null, "mime": "image/jpeg", "width": 1000, "height": 447, "size": 138779, "signature": "dc570b1218a024f1acf9dd4b39fc6e7ea2a12d64fae46622e2a25d85e31d8d76", "created_at": "2016-05-04 19:34:28", "updated_at": "2017-02-23 18:01:01" } ] } }, { "id": 634992, "brand_id": 434, "country_id": 227, "product_id": 185661, "sku": "810-0607", "name": "BRAKE PEDAL COVER TOURING BAD AXE BLACK", "list_price": "99.00", "standard_dealer_price": "69.30", "supplier_product_id": "BAX-340-BLK", "length": 7, "width": 5, "height": 1, "weight": 1, "upc": null, "superseded_sku": null, "status_id": "NEW", "status": "NEW", "unit_of_measurement_id": 12, "has_map_policy": true, "sort": 0, "created_at": "2022-04-13 07:53:11", "updated_at": "2022-05-16 07:31:54", "published_at": "2022-05-16 07:31:54", "images": { "data": [] } } ] }, "vehiclemodel": { "data": { "id": 969, "vehiclemake_id": 22, "db2_key": "193", "name": "FLSTF Softail Fat Boy", "created_at": "2016-10-10 14:47:50", "updated_at": "2018-04-11 17:43:23", "vehiclemake": { "data": { "id": 22, "db2_key": "HARLEY", "name": "Harley-Davidson", "created_at": "2016-10-10 14:47:14", "updated_at": "2021-12-22 17:44:31" } } } }, "vehicleyear": { "data": { "id": 39, "name": 1993, "created_at": "2016-10-10 14:50:07", "updated_at": "2016-10-10 14:50:07" } } } ], "meta": { "cursor": { "current": "61poYD9eaDkR", "prev": null, "next": null, "count": 1 } } } i can get the id 2464 but i cant get data under items -> data -> id (389) , or images data -> filename or list_price ect.. please help
×
×
  • 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.