By: teknojunki
Date: 2005-11-27
Time: 04:16
|
Example of class for MySQL DBI was wondering if you could show me your example of using a class for a MySQL db connection. I have an existing application that uses OOP and my class is not working properly with $TBS->ObjectRef. This is probably do to my function layout.
Thanks in advance |
||
By: Skrol29
Date: 2005-11-28
Time: 01:48
|
Re: Example of class for MySQL DBHello,
I can give an example but this should be useless because MySQL is supported in native with TBS. |
||
By: teknojunki
Date: 2005-11-28
Time: 02:12
|
Re: Example of class for MySQL DBI think I missing something then. If TBS has the built in support, then where do I configure the host, username, password, and dbname?
These are defined in my dbConnect class and according to your instructions I thought I could call that class/method to connect/fetch. Please clarify this for me. Thank you for your help. |
||
By: Anonymous
Date: 2005-11-29
Time: 04:03
|
Re: Example of class for MySQL DBTo clarify a bit more;
Here is my class file for the dbConnect:
When I try to set up a $TBS->MergeBlock('blkname', $connect, 'SELECT * FROM tbl1'); The connection is not setting up toexecute the SQL. I can execute several statements and retrieve data just fine for anything I need, but I guess I am not understanding your instructions as to how to perform the mergeblock. |
||
By: Skrol29
Date: 2005-11-30
Time: 16:08
|
Re: Example of class for MySQL DBHello,
> If TBS has the built in support, then where do I configure > the host, username, password, and dbname? TBS doesn't performe any connection. Not for MySQL and neither for any other data source. You have to open your connexion, then TBS can use it. Regarding to your code, you can do the following:
or
|
||
By: Johnny
Date: 2006-06-15
Time: 12:11
|
Re: Example of class for MySQL DBI use PEAR with TinyButStrong
it's quite simple as follows:
|