How Can I Print Raw Query?

I have got database query:

$order_id = 'order_id = 4';
db_query('SELECT * FROM ?:orders WHERE ?p', $order_id);

How can I print the above query to

SELECT * FROM cscart_orders WHERE order_id = 4;


1. If you already do, do it via db_quote
2. It should be like this.
$order_id = 7
db_get_row('SELECT * FROM ?:orders WHERE order_id = ?i', $order_id);
3. The function is ready fn_get_order_info($order_id);
Best regards

Also to print query you can use

fn_print_r(db_quote('SELECT * FROM ?:orders WHERE order_id = ?i', $order_id));

To print result

fn_print_r(db_get_row('SELECT * FROM ?:orders WHERE order_id = ?i', $order_id));