shlok.mobi
General Knowledge Questions and Answers - 99
PHP
Questions and Answers
Prepare for Interview
Question:
what is difference between mysql_fetch_array(),mysql_fetch_row() and mysql_fetch_object()
Answer:
mysql_fetch_row ::Return row as aan enumrated array and each line contain a unique ID .example.
$result=mysql_query($query);
while($row=mysql_fetch_row($result))
{
print ""$row[0]"";
print ""$row[1]"";
print ""$row[2]"";
}
mysql_fetch_array ::Return row as anassociative or an¬ enumrated array¬ or both which is default .you can refer to outputs as databases fieldname rather then number¬ .example.
$result=mysql_query($query);
while($row=mysql_fetch_array($result))
{
print ""$row['name']"";
print ""$row['address']"";
print ""$row['city']"";
}
mysql_fetch_object¬ :: it return as an object on the place of array.
$result=mysql_query($query);
while($row=mysql_fetch_object($result))
{
print ""$row->name"";
print ""$row->address"";
print ""$row->city"";
}


More Questions :
  • How many open modes available when a file open in PHP?
  • What is the basic syntax of Php?
  • How to delete a file from the system
  • How to redirect a page in php?
  • How to create a session? How to set a value in session ? How to Remove data from a session?
  • What is Full form of PHP ? Who is the father or inventor of PHP ?
  • What is Full form of PHP ? Who is the father or inventor of PHP ?
  • What are the differences between PHP3 and PHP4 and PHP5 ? what is the current stable version of PHP ? what advance thing in php6
  • What is a Session?
  • How many ways we can pass the variable through the navigation between the pages?
  • How can we create a database using php?
  • Explain include(), include_once, require() and require_once.
  • do i store binary in my sql?
  • can we get the ID genrated from the previous insert operation ?
  • What is the purpose of ob_start() ?
  • How do you upload videos using PHP & MySQL
  • What's the difference between COPY OF A FILE & MOVE_UPLOAD_FILE in file uploading?
  • List out the predefined classes in PHP?
  • Explain the types of functions for Splitting String?
  • What types of MYSQL function available in PHP?
  • Test your English Language
  • Comics of the Day
  • New Years Makeup Ideas
  • Weird Flowers
  • Strangest Fruits
  • Interest Rate Calculator
  • Coolest Hotels Ever
  • What to Eat in Kerala
  • Most Amazing Water Slides In The World
  • Lok Sabha Speaker Duration - Quiz
  • Weird Plants
  • Shimla
  • Ekadashi
  • Celebration of krishna Janmashtami
  • Santa Fe
  • New Years Eve Cake Ideas
  • Best Women Trench Coats
  • Handmade Valentines Day Cards
  • How To Build or Rebuild Trust
  • Bill Gates
  • Arvind Kejriwal
  • Most Powerful Bikes
  • loading...

    Did you Know :

    Book : waiting for godot
    Author : samuel becket.
    More ...

    Shlok Consultants