Jump to content

codingbenn

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by codingbenn

  1. the information inside the files is like this; {"Item":{"FirstName":"Frederik","LastName":"Boi","CommonName":null,"Height":"184","DateOfBirth":{"Year":"1981","Month":"10","Day":"25"},"PreferredFoot":"Right","ClubId":"100087","LeagueId":"4","NationId":"7","Rating":"64","Attribute1":"60","Attribute2":"65","Attribute3":"64","Attribute4":"59","Attribute5":"61","Attribute6":"64","Rare":"1","ItemType":"PlayerM"}} also do i add this into the sql execute thing?
  2. I have merged all the json files into one text file? wont it be easier just to search the text file?
  3. is this code formatting the jsons for a database? Also I have managed to get all the jsons into a text file..would it be easier to search through it and then when it finds a name read the information from the same line?
  4. How would I add a textbox for them to search? would I use <input type="text"> but how would I link it? also how would I dump all these jsons into a database?
  5. How would I dump the files into a database though?
  6. So basically want to have a search box and I want users to type in a name and then hit search. It then needs to search through multiple JSON files(11,480) to be precise. I want it to find the name inside the JSON and then pull other information from that JSON file. ATM I only have it where you put in the json file and then it reads the data. The code I currently have is; <?php $string = file_get_contents("2.json"); $json_a=json_decode($string,true); echo "First Name: ", $json_a['Item'][FirstName]; echo "<br>Surname: ", $json_a['Item'][LastName]; echo "<Br>Height: ", $json_a['Item'][Height], "cm"; echo "<br>Rating: ", $json_a['Item'][Rating], " OVRL"; echo "<br>Pace: ", $json_a['Item'][Attribute1]; echo "<br>Shooting: ", $json_a['Item'][Attribute2]; echo "<br>Passing: ", $json_a['Item'][Attribute3]; echo "<br>Dribbling: ", $json_a['Item'][Attribute4]; echo "<br>Defending: ", $json_a['Item'][Attribute5]; echo "<br>Heading: ", $json_a['Item'][Attribute6]; ?> Thanks
×
×
  • 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.