removed all hardcoded table prefixes

This commit is contained in:
Frank Harris 2025-11-05 13:33:45 -05:00
parent 98ddfb9c3e
commit 7276af0d32
19 changed files with 89 additions and 89 deletions

View file

@ -16,7 +16,7 @@ When the user clicks the "Add to Cart" button, the next page to load is "add_to_
All the configuration info is passed to the add_to_cart.php in hidden fields
In our website, we are setting "post" pages with a "Tag". The first tag in our post should be the service ID from the services table
There are other methods that might be better to get the info. But all we need is the "service_ID" in the "ogp_billing_services" table
There are other methods that might be better to get the info. But all we need is the "service_ID" in the "{$table_prefix}billing_services" table
This method means we can use one code block in every game page and fill in the data dynamically.
*/
@ -42,7 +42,7 @@ include(__DIR__ . '/includes/menu.php');
$new_description = str_replace("\\r\\n", "<br>", $_POST['description']);
$service = $_POST['service_id'];
$change_description = "UPDATE opg_billing_services
$change_description = "UPDATE {$table_prefix}billing_services
SET description ='".$new_description."'
WHERE service_id=".$service;
$save = $db->query($change_description);
@ -60,7 +60,7 @@ THIS IS WHAT WE DISPLAY ON THE SHOP PAGE AT THE TOP
<?php
// Shop Form
if(intval($_REQUEST['service_id']) !==0) $where_service_id = " WHERE enabled = 1 and service_id=".intval($_REQUEST['service_id']); else $where_service_id = " where enabled = 1";
$qry_services = "SELECT * FROM ogp_billing_services ".$where_service_id ." ORDER BY service_name";
$qry_services = "SELECT * FROM {$table_prefix}billing_services ".$where_service_id ." ORDER BY service_name";
$services = $db->query($qry_services);
if (isset($_REQUEST['service_id']) && $services === false) {
@ -191,7 +191,7 @@ if ($row['price_monthly'] == 0.0) {
//loop through each of the assigned servers and see if its disabled
foreach($rsiArray as $rsi)
{
$query = "SELECT * FROM ogp_remote_servers WHERE remote_server_id = ".$rsi;
$query = "SELECT * FROM {$table_prefix}remote_servers WHERE remote_server_id = ".$rsi;
$result = $db->query($query);
foreach($result as $rs)
{