MySQL Database Operations
- Which operator is used to access property of an object in PHP?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
If $a represents an object, the properties it has can be accessed as $a->property-name. For instance, $a->>white, $a->black, $a->blue, $a->red can be the properties of $a and accessed in this way.
- Arrays can have associative indices in PHP.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The PHP arrays can even have both numeric and associative elements. For example, $x[1] and $x[“large”] can both be the elements of the same array. $x can be an object, whose elements are accessed by the arrow ‘->>’ operated.
- In PHP, how is the first element accessed if $a represents an array with numeric indices?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
If $a represents an array with numeric indices, its elements are accessed as $x[0], $x[1], and so on. In general terms, each element at the position i is accessed and used as $a[i – 1].
- Which statement is used to remove indexes on tables?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
MySQL provides statements to change the structure of tables. To add or remove the indexes on the existing database tables, the ‘CREATE INDEX’ and ‘DROP INDEX’ tables are used.
- The variable that returns code from operations that return true or false is _____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The Perl Non-handle variable ‘$rc’ returns code from operations that return true or false. ‘$rv’ returns value from operations that return an integer. ‘$rows’ returns value from operations that return a row count.