Terry Cragg Posted September 22, 2010 Share Posted September 22, 2010 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 https://forums.phpfreaks.com/topic/214089-help-with-code-variable_name-connection-execute/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 22, 2010 Share Posted September 22, 2010 $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 https://forums.phpfreaks.com/topic/214089-help-with-code-variable_name-connection-execute/#findComment-1114049 Share on other sites More sharing options...
Terry Cragg Posted September 29, 2010 Author Share Posted September 29, 2010 Thanks, it was an instance of ADOdb which I have now read up on. I want to close this thread but don't know how to... any help please? Link to comment https://forums.phpfreaks.com/topic/214089-help-with-code-variable_name-connection-execute/#findComment-1117133 Share on other sites More sharing options...
PFMaBiSmAd Posted September 29, 2010 Share Posted September 29, 2010 There's a green 'Mark Solved' button on the lower left-hand side of the page. Link to comment https://forums.phpfreaks.com/topic/214089-help-with-code-variable_name-connection-execute/#findComment-1117134 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.