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

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

COOIS - Saving Object Overview WIP Status layouts
COOIS - Would like to be able to save the layout of an Object Overview - WIP Status report. There i

If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.

i have this c

single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be

elseif help!
OK so I'm new to the site, as well as PHP altogether (Trying my hand at managing an online RPG) and

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

search query in mysql in php problem
my search query wont work, i know, that my codes are correct.please help

Code: [Select]&l

Transaction variant for VA02 not working
My requirement is to have transaction for user to only add the output and print a sales order.

Email "$"
Hello!!

Any PHP guy with a bit of a knowledge in Flash ?

When I send a JPEG from flash

php include email form with attachment
I have had no luck with finding a email form all over the Internet for various reasons. Some insecur

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