Topic: ? how to use $db->*

hi all.  a budding module developer here.  by looking at the punbb code i'm getting an idea on how to use the db variable but would like to know more.  does anybody have a link where this is already discussed or would like to comment?

$db->prefix, $db->query, $db->fetch_row...  how else can i use this bugger?  thanks for any tips.

Re: ? how to use $db->*

take a look in include/mysql/mysql.php (i think the folder is something like that, can't remember off the top of my head).

Re: ? how to use $db->*

oh neat, i get it.  in include/dblayer/mysql.php?  after 'function' is the word to use.  cool thanks.

Re: ? how to use $db->*

things you can do with $db->
    prefix, query, result, fetch_assoc, fetch_row, num_rows, affected_rows,
    insert_id, get_num_queries, get_saved_queries, free_result,
    escape, error, close, prefix...

not sure what else.  it would be nice to have a place with examples also.  maybe when i get more comfortable using this i'll post some.  thanks again for the information.

5 (edited by eric235u 2007-05-03 17:46)

Re: ? how to use $db->*

here's an additional stupid newb question for any bored programmers out there.

what is -> called?  is it only used to make an object do something?  thanks for tips.

i'm currently reading through http://hudzilla.org/phpwiki/index.php?title=Main_Page

Re: ? how to use $db->*

eric235u wrote:

here's an additional stupid newb question for any bored programmers out there.

what is -> called?  is it only used to make an object do something?  thanks for tips.

i'm currently reading through http://hudzilla.org/phpwiki/index.php?title=Main_Page

-> is used to access members of an object. In many other languages you use a dot (.) instead, but I think since the dot in PHP has other functionality, -> is used instead.