Development Articles
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDevelopment Articles

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #31  
Old May 17th, 2000, 07:16 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: complex objects - more readable

Code:
$ppm = new providerPayment ; 
$ppm = $business_entity->provider_payment_list->childAdd($pm_id) ; 

$business_entity->provider_payment_list->active_list[$c]->setPaymentTypeOID($pm_id); 

$f=$business_entity->provider_payment_list->active_list[$c]->getPaymentTypeOID(); 

/* for loop */ for ($y = 0; $y < count($business_entity->provider_payment_list->active_list); $y++) { $z = $business_entity->provider_payment_list->active_list[$y]->getPaymentTypeOID(); } 


Reply With Quote
  #32  
Old May 17th, 2000, 07:19 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: more readable code

Code:
$ppm = new providerPayment ; 


Code:
$ppm = $business_entity->provider_payment_list->childAdd($pm_id) ; 


Code:
$business_entity->provider_payment_list->active_list[$c]->setPaymentTypeOID($pm_id);


Code:
$f=$business_entity->provider_payment_list->active_list[$c]->getPaymentTypeOID(); 



Code:
/* for loop */ for ($y = 0; $y < count($business_entity->provider_payment_list->active_list); $y++) { $z = $business_entity->provider_payment_list->active_list[$y]->getPaymentTypeOID(); } 


Reply With Quote
  #33  
Old May 25th, 2000, 09:09 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
limit to 5 records

Hi,
<br>
<br>
How do I limit the number of rows to 5 using this class most efficiently?
<br>
<br>
Thanks!
<br>
<br>
I like the class very much! Thanks for the good article!
<br>
Heiko

Reply With Quote
  #34  
Old June 2nd, 2000, 07:19 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: limit to 5 records

This is done in the SQL query you build....
<br>
<code>
<br>
IE: $query = "SELECT * FROM testtable WHERE
<br>
fieldname='$myfield'
<br>
GROUP BY date_field DESC
<br>
LIMIT 5";
<br>
</code>
<br>
Best Regards Arne

Reply With Quote
  #35  
Old June 8th, 2000, 01:03 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Great article.

I would like to thank you kindly for making the classes in PHP as easy to understand as possible. This has greatly increased my learning and will lead to speedier development. This is definitely the best, the most concise and easiest to understand class tutorial I have found over the last few months. I would go as far to say that it is the most easiest to understand of many tutorials that I have seen over the years. Have you written any other articles and if so where can I locate them.

Thank you very much

Cedric Edwards

Reply With Quote
  #36  
Old July 6th, 2000, 05:25 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
database class

I'm building my own database class.
for the moment i only manage ODBC and MYSQL functions like connection, close , numrows , seek , insert , drop , next previous ...

But (cause, there always a but), i would like to know if other people are doing the same and if they have the some difficulties making some functions.

if some people can give me web site address i'll be glad too :-)

Be the force with developers ^_^

Reply With Quote
  #37  
Old July 10th, 2000, 11:28 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: database class

Hi,

i'm also doing a DB class, though it's MySQL only... in fact i'm building it for practical purposes (ie retrieving info ) as opposed to adminstrative purposes, so I don't need table drops etc....

At the moment i'm trying to do a function to retrieve data and place it in a table. I was going to try to generate the table dynamically depending on the amount of columns in the table being searched. DO you know of a way of doing this ? At the moment I am using the "query" and "next_record" functions described in the article, as well as a fetch function which goes:


function dbfetch ($Fetch_String)
{
$this->dbconnect();

# printf("Debug: fetch = %s n", $Fetch_String);

$this->Fetch_ID = mysql_db_query($this->database, $Fetch_String);
$this->Row = 0;
$this->Errno = mysql_errno();
$this->Error = mysql_error();
if (!$this->Fetch_ID)
{
$this->halt("Invalid SQL: ".$Fetch_String);
}
else
{
$this->Record=mysql_fetch_array($this->Fetch_ID);
return $this->Record;
}

}//end dbfetch function

But i haven't found a way of retrieving the columns names of the table columns.... Any ideas ?

-nick

Reply With Quote
  #38  
Old July 11th, 2000, 07:49 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Urgente


Por favor nesecito informacion sobre propaganda , no se si me podrian ayudar , escreibanme ami email .....

Reply With Quote
  #39  
Old September 10th, 2000, 06:20 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: accessing oracle database?

can someone please tell me how to compile php with Oracle support. i installed PHP and it works great with Apache, and MySql on win98 (plus CGI and Perl) - but it again i cant connet to Oracle with ora_logon.

thank you

Reply With Quote
  #40  
Old October 14th, 2000, 05:21 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Thanks - Direction?

This was excellent - I have been reading up on classes quit a bit now online. Any additional places you would recommend looking that perhaps includes examples of writing and updating to MySQL - although it might be good practice to expand this?

Regards,
RBS

Reply With Quote
  #41  
Old December 20th, 2000, 02:12 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Would we still need to call mysql_close()?

Like the previous author said mysql_close();
Look at www.php.net and go to the manual - look under the functions.

if you are not using mysql_pconnect(); than no worries - but if you are not aware of mysql_pconnect you may want to brush up on that as well - it very useful if you are making several queries etc...

Reply With Quote
  #42  
Old December 20th, 2000, 03:09 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Thanks - Direction?

You don't need to post this - I just wanted to say that this is just a smokin use of class! Thanks so much - I am going to look much smarter than I actually am!

Reply With Quote
  #43  
Old January 4th, 2001, 04:43 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: %s

I have been trying to find out the purpose of the
<code>
%s
</code>
that is used repeatedly in the example code. My best guess is standard output?

Reply With Quote
  #44  
Old April 25th, 2001, 04:48 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Great article

Thank you DevShed.com for this great article. You have helped me much, very much. Now I'm accessing my MySQL databases with class.

Reply With Quote
  #45  
Old May 12th, 2001, 09:40 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
great starter

Thanks kristian for initiating me to classes in Php .

Good one , and i would like to have more examples,where do i get them?


Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDevelopment Articles > Accessing Databases with Class


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |