MySQL Database Operations


  1. Which operator is used to access property of an object in PHP?











  1. 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.


  1. Arrays can have associative indices in PHP.











  1. 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.



  1. In PHP, how is the first element accessed if $a represents an array with numeric indices?











  1. 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].


  1. Which statement is used to remove indexes on tables?











  1. 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.



  1. The variable that returns code from operations that return true or false is _____________.











  1. 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.