I know you don't like OO,, but that's how we write our PHP. Since we're using OO programming to interface with an RDBMS, there is an "impedance mismatch". If we had an object/relational database, we could define the objects in the DB and query things much more naturally. So instead of
$db = new objDB( "db_server_1" );\n$sql = "SELECT \n tbl_user.*,\n tbl_office.addr1 AS office_addr1,\n tbl_office.addr2 AS office_addr2,\n tbl_office.city AS office_city,\n tbl_office.state AS office_state,\n tbl_office.zip AS office_zip,\n tbl_office.phone AS office_phone,\n tbl_office.fax AS office_fax\nFROM\n db_user.tbl_user,\n db_office.tbl_office\nWHERE\n tbl_user.office_id = tbl_office.id\n AND tbl_user.id = '$user_id'";\n$db->query( $sql )
we could use
$db = new objDB();\n$db->query( "GET user '$id'")
That's what I mean by "manually".