Need help to change a script

Hello, i have a php script that I’m looking to change a bit to a current project but not sure why it’s not working.

For not making this post huge here is a LINK to the source files. this are the files that work

Contains 1 PHP file in which is the script , also included the SQL file to see how the db looks and dbconnect.php file just in case(w/o the info of my db)

I used this script some years ago on a different project and at that time I had someone optimize the code because mine was a bit messy, but now I want to repurpose it for something else.

What I need is to change the “Title” names, add some, remove some and change db accordingly.

when I tried it messed up all the script. i think i got the problems because of this part:

function bundleData($conn, $prod)
{
    $parts = [ 24 => 'SS', 25 => 'MS', 26 => 'SO', 27 => 'EO' ];
    $tempArr = array_fill_keys(array_keys($parts), '');
    $res = $conn->prepare("SELECT b.bname
                                , ROUND(b.craft/1, 2) as craft
                                , r.part_id
                                , r.req
                           FROM bundle b 
                                JOIN
                                requirement r USING (pid, bname)
                           WHERE b.pid = ?
                           ORDER BY bname    
                          ");

this script it’s like an editor to add and remove stuff from db and show some stuff, it’s part of a different script but it’s independent
There are 2 options in the script which shows in the same page Product and Bundle

What i need to change here:

Products -> Niche

  • Product Code -> Niche (text)
  • Title -> Search Results (number)
  • Price -> Average BSR (number)
  • add new option -> Niche Scor(number)

Bundles -> Keywords

  • Bundle -> Keyword(text)
  • SS -> Search Results(number)
  • MS -> Average BSR(number)
  • SO -> Niche Scor(number)
  • EO - > deleted
  • Craft -> deleted
Sponsor our Newsletter | Privacy Policy | Terms of Service