top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How we can retrive the data in the result set of MYSQL using PHP?

+3 votes
475 views
How we can retrive the data in the result set of MYSQL using PHP?
posted Jan 11, 2016 by Ritika Sharma

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

1 ) mysql_fetch_row() : The mysql_fetch_row() function returns a row from a resultset as a numeric array.
This function gets a row from the mysql_query() function and returns an array on success, or FALSE on failure or when there are no more rows.
mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier.
The row is returned as an array.
Each result column is stored in an array offset, starting at offset 0.

2) mysql_fetch_array(): The mysql_fetch_array() function fetches a result row as an associative array or a numeric array or using both the ways.

3) mysql_fetch_object(): The mysql_fetch_object() function fetches a result row as an object.

4)mysql_fetch_assoc(): The mysql_fetch_assoc() function fetches a result row as an associative array.

answer Jan 12, 2016 by Manikandan J
Similar Questions
+2 votes

I have moderate level PHP programming skills. I am also interested in merging those skills inside of the WordPress app. With their advanced responsive design themes and many other functions it seems like a good idea. I have tried loading some PHP plug-ins in WP – but I don't seem to get them to do more than basics.

Can anybody help me on how I can get started working with PHP/MySQL inside of the WordPress app?

0 votes

I have a client where their next auto-increment number just jumped from 2300 to ********** for reasons not understood. They want it set back.

Options such as dropping the primary key and rebuilding the index is NOT possible -- this is a relational table thing. So, is there a way (programmatically) to set the next number in an auto-increment?

Something like:

alter table abc auto_increment = 2301;

Any ideas of why this happened?

+2 votes

I have a date field on an html form that users may leave blank. If they do leave it blank I want to write the date 01/01/1901 into the mysql table. How can I accomplish this and where in my .php script file should I put the code?

...