Call db table from any PHP file


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I want to be able to call a database table that will be setup in another file called init.php, and be able to call it from any PHP file that has init.php included.

Table is called abc_offline and has columns a,b,c in it.

What I am wanting is to be able to call it from any PHP file by:
$offline['a'] for example

How do I do this, I been told I need an array in init.php but I don't know how to do this.

At the moment the init.php has the DB conncect details and some calls to other tables.

Regards

No comments posted yet

Your Answer:

Login to answer
61 Like 21 Dislike
Previous forums Next forums
Other forums

Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on h

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

Oracle11g Patch issue
Hi all,

I'm getting the following error while installing Oracle11g Patch 11.1.0.7.0 on IBM-AI

extract data
Code: <div class="post hentry uncustomized-post-template">

Supress some serveroutput but not all
Hi,

I have a script I'm working on that uses plsql to create and RMAN script, this uses d

PHP - HTML
Could anyone give me some GOOD sample links for php - html email tutorial.

Thanks!

Loosing changed contents when used FM REUSE_ALV_GRID_DISPLAY
Hi,

I have used FM REUSE_ALV_GRID_DISPLAY in my program as below.

CALL FUNCT

Vertical Alligning - Not working in 1 cell?
<?php

echo "<table id="valign" width="60%" style=

Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou

remove a ; from emails in textarea
Code: <?php

session_start();

$database_host = "localhost&qu

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash