Jump to content

help with code - $variable_name = $connection->Execute(


Terry Cragg

Recommended Posts

Hi

I am newish to PHP and have been thrown in at the deep end by being given an unfinished project to undertake at my office. There are various parts of the code I don't understand and I don't even know if some bits are PHP or MySQL as it is far in advance of my experience. If I give some examples I would be grateful if anyone could give me some pointers on what the code means.

 

Example 1:

 

$variable_name = $connection->Execute('SELECT etc, etc, etc')

 

I have already tried to find the answers on the PHP and MySQL websites and searched on Google to no avail.

 

Thanks in advance for any help.

Link to comment
Share on other sites

$connection in an instance of a database class. Somewhere there is a statement $connection = new class_name(); The class_name would indicate what class it is an instance of.

 

->Execute in a method of that database class and its name implies that it executes the database query that it is supplied as a parameter when it is called. The result that the method returns is assigned to $variable_name.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.