Skip to main content
added information
Source Link
Akshat
  • 1.2k
  • 11
  • 22
$result = $wpdb->get_results( "SELECT `account_number`,`consumer_name`,`bill_amount`,`due_date`,`disco_date`,`bill_status` FROM {$wpdb->prefix}_bill_inquiry where  `account_number` = '$inputnumber' AND `pin_number` = '$inputpin'", OBJECT );

$wpdb->prefix will automatically print the prefix, then to convert the result in array form you can use the following snippet:

$result = json_decode(json_encode($result),true);

You can either place it in a template or you can create a shortcode in functions.php, you can refer shortcode docs.

$result = $wpdb->get_results( "SELECT `account_number`,`consumer_name`,`bill_amount`,`due_date`,`disco_date`,`bill_status` FROM {$wpdb->prefix}_bill_inquiry where  `account_number` = '$inputnumber' AND `pin_number` = '$inputpin'", OBJECT );

$wpdb->prefix will automatically print the prefix, then to convert the result in array form you can use the following snippet:

$result = json_decode(json_encode($result),true);
$result = $wpdb->get_results( "SELECT `account_number`,`consumer_name`,`bill_amount`,`due_date`,`disco_date`,`bill_status` FROM {$wpdb->prefix}_bill_inquiry where  `account_number` = '$inputnumber' AND `pin_number` = '$inputpin'", OBJECT );

$wpdb->prefix will automatically print the prefix, then to convert the result in array form you can use the following snippet:

$result = json_decode(json_encode($result),true);

You can either place it in a template or you can create a shortcode in functions.php, you can refer shortcode docs.

Source Link
Akshat
  • 1.2k
  • 11
  • 22

$result = $wpdb->get_results( "SELECT `account_number`,`consumer_name`,`bill_amount`,`due_date`,`disco_date`,`bill_status` FROM {$wpdb->prefix}_bill_inquiry where  `account_number` = '$inputnumber' AND `pin_number` = '$inputpin'", OBJECT );

$wpdb->prefix will automatically print the prefix, then to convert the result in array form you can use the following snippet:

$result = json_decode(json_encode($result),true);