Reading notes (Master joomla1.5 Chapter III The database 02)

2010-07-06  来源:本站原创  分类:PHP  人气:190 

loadAssocList:

public function test_loadAssocList () (
echo "loadAssocList: \ n";
$ This-> assertNotNull ($ this-> db);
$ Query = "SELECT * FROM"
. $ This-> db-> nameQuote ('#__ newsfeeds');
$ This-> db-> setQuery ($ query);
print_r ($ this-> db-> loadAssocList ());// hash as the key array to num
echo "\ nkey: name: \ n";
print_r ($ this-> db-> loadAssocList ('name'));// hash array in order to column:' name 'as key
)

echo:

Array
(
[0] => Array
(
[Catid] => 4
[Id] => 1
[Name] => Joomla! Announcements
[Alias] => joomla-official-news
[Link] => http://feeds.joomla.org/JoomlaAnnouncements
[Filename] =>
[Published] => 1
[Numarticles] => 5
[Cache_time] => 3600
[Checked_out] => 0
[Checked_out_time] => 0000-00-00 00:00:00
[Ordering] => 1
[Rtl] => 0
)

[1] => Array
(
[Catid] => 4
[Id] => 2
[Name] => Joomla! Core Team Blog
[Alias] => joomla-core-team-blog
[Link] => http://feeds.joomla.org/JoomlaCommunityCoreTeamBlog
[Filename] =>
[Published] => 1
[Numarticles] => 5
[Cache_time] => 3600
[Checked_out] => 0
[Checked_out_time] => 0000-00-00 00:00:00
[Ordering] => 2
[Rtl] => 0
)

)
key: name:
Array
(
[Joomla! Announcements] => Array
(
[Catid] => 4
[Id] => 1
[Name] => Joomla! Announcements
[Alias] => joomla-official-news
[Link] => http://feeds.joomla.org/JoomlaAnnouncements
[Filename] =>
[Published] => 1
[Numarticles] => 5
[Cache_time] => 3600
[Checked_out] => 0
[Checked_out_time] => 0000-00-00 00:00:00
[Ordering] => 1
[Rtl] => 0
)

[Joomla! Core Team Blog] => Array
(
[Catid] => 4
[Id] => 2
[Name] => Joomla! Core Team Blog
[Alias] => joomla-core-team-blog
[Link] => http://feeds.joomla.org/JoomlaCommunityCoreTeamBlog
[Filename] =>
[Published] => 1
[Numarticles] => 5
[Cache_time] => 3600
[Checked_out] => 0
[Checked_out_time] => 0000-00-00 00:00:00
[Ordering] => 2
[Rtl] => 0
)

)

相关文章
  • Reading notes (Master joomla1.5 Chapter III The database 02) 2010-07-06

    loadAssocList: public function test_loadAssocList () ( echo "loadAssocList: \ n"; $ This-> assertNotNull ($ this-> db); $ Query = "SELECT * FROM" . $ This-> db-> nameQuote ('#__ newsfeeds'); $ This-> db-> setQuery ($

  • Reading notes (Master joomla1.5 Chapter III The database 03) 2010-07-06

    loadObject: / / return an instance of stdClass class public function test_loadObject () ( $ Query = "SELECT name FROM" . $ This-> db-> nameQuote ('#__ users'); $ This-> db-> setQuery ($ query); print_r ($ this-> db-> loadObject

  • Reading notes (Master joomla1.5 Chapter III The database01) 2010-07-06

    Joomla 1.5 db-schema: http://dev.joomla.org/downloads/Joomla15_DB-Schema.htm / / Network articles: http://qkzz.net/article/c0c7142f-2d5b-4808-933a-f648d9397ba8_2.htm Return result set loadResult / / return the first row, first field loadObject / / re

  • Reading notes (Master joomla1.5 Chapter The database: JTable 04) 2010-07-06

    The official interpretation of JTable / ** * Abstract Table class / / abstract table class personally think that is the parent class dao * * Parent classes to all tables. * * @ Abstract * @ Package Joomla.Framework * @ Subpackage Table * @ Since 1.0

  • Reading notes (Master joomla1.5 Chapter The database01) 2010-07-06

    Joomla 1.5 db-schema: http://dev.joomla.org/downloads/Joomla15_DB-Schema.htm / / Network articles: http://qkzz.net/article/c0c7142f-2d5b-4808-933a-f648d9397ba8_2.htm Return result set loadResult / / return the first row, first field loadObject / / re

  • Long Tail Theory Reading Notes: A Brief History Chapter Elliot 2010-04-11

    Elliot is the pinnacle of a series of business innovations, these innovations mainly in the production, supply, distribution and sale of goods methods, such as Internet shopping can be realized for all elements of non-Internet: Federal Express, Inter

  • Reading notes for the 20th chapter 'Broadcasting' of unp. 2011-08-28

    We know that information transmission means through the Ethernet consist of unicasting, multicasting, anycasting and broadcasting. The following table show differen forms of addressing. Type IPv4 IPv6 TCP UDP # IP interfaces identified # IP interface

  • Reading Notes: Enterprise JavaBeans, 3.0 Chapter 1. Introduction 2010-07-31

    Reading Notes: Enterprise JavaBeans, 3.0 Chapter 1. Introduction 1.1. Server-Side Components In business systems, object-oriented languages are used to improve development of GUIs, to simplify access to data, and to encapsulate the business logic. A

  • sed and awk rookie notes - Chapter III understand Regular Expressions 2010-12-28

    Chapter III understand Regular Expressions The third chapter is the most important, a lot of regular expressions together with the work of all wonderful, so be sure to learn! P45: Summary of special characters. P54: POSIX character classes ([: space:

  • Reading notes on the code refactoring (1) 2010-04-16

    AgileJava reading notes (1) AgileJava is a test-driven development based on the method to help you learn how to polish your Java code, and thus obtain a stable object-oriented design and high-maintainable, high-quality systems. The book with a studen

  • javascript DOM programming arts reading notes 2010-09-06

    javascript DOM programming arts reading notes The first part of the directory Chapter 1 Origin of JavaScript 1.1 JavaScript 1.2 A Brief History of the browser war 1.3 standard 1.4 Summary Chapter 2, JavaScript 2.2 Grammar 2.1 Grammar 2.3 statement pr

  • JUnit In Action Reading Notes (1) 2008-03-29

    JUnit In Action Reading Notes (1) Part1 JUnit distilled chapter1 will teach you what the JUnit framework is and what problems it solves. chapter2 will take you on a discovery tour of the core JUnit classes and how to best use them. chapter3, you'll p

  • JavaScript: The Good Parts Reading Notes (2) 2009-08-24

    Nothing in Chapter 2, Chapter III of the next object literal speaker also prototyep, not too many basic content of the book are mentioned rhinoceros, but a small detail that: We generally object to create a object literal that is the case, var obj =

  • Chapter III Servlet Programming 2010-03-29

    Chapter III Servlet Programming 3.2 servlet structure and Servlet-related classes, interfaces are defined in the javax.servlet and javax.servlet.http these two packages, the You can download java ee api documentation to see. javax.servlet package def

  • Chapter III Extjs in the development, how to achieve code reuse (Getting Started tutorial) 2009-10-02

    Chapter III Extjs in the development, how to achieve code reuse (Getting Started tutorial) If you want to achieve the following interface, you will choose the kind of code? Code 1: Code 2: According to the above created object: You will choose? ? Rec

  • Continued integration of reading notes 2010-03-17

    "Continuous integration software quality improvement and risk reduction of the Road" Continued integration of all of the people interested in the topic should read this book, but quickly browse again on the trip, the theme, after all, is a very

  • Reading notes (1) array 2010-05-04

    Reading notes 1. In c + +, there are two ways the array statements: one is to use the built-in array; Another is to use Vector. Vector is much easier to use and more secure than the basic element array, and should therefore be preferred to use Vector

  • <Software Architecture Design> reading notes notes 2010-05-07

    "Software Architecture Design" reading notes http://uptodate.javaeye.com/blog/346676 Domain model lack of knowledge, not in-depth understanding of Robustness analysis?

  • Reading Notes: Your First Cup: An Introduction to the Java EE Platform 2010-07-10

    Reading Notes: Your First Cup: An Introduction to the Java EE Platform 1. Differences Among Three platforms Java technology is both a programming language and a platform. The Java programming language is a high-level object-oriented language that has

  • Reading Notes explain design pattern mode (Interpreter pattern) 2010-10-28

    Interpreter Pattern: Given a language, define a representation of its grammar, and define an interpreter, the interpreter uses the representation to interpret sentences in the language. By the definition, does not explain the mode is a commonly used