What is the difference between mysql fetch row and mysql fetch assoc




















Personally, I read the documentation and was still a bit confused, mostly because while they could stand independently and make sense, together they are a bit unintuitive. Hence the confusion. Thank you for clarifying that this isnt the case. Gabriel Sosa Gabriel Sosa 7, 3 3 gold badges 37 37 silver badges 48 48 bronze badges. Peter Postma Peter Postma 41 2 2 bronze badges. Answer two from the first link you provided is correct. The comment said: "Instead both returns all the rows from table.

Boundless Boundless 2, 2 2 gold badges 24 24 silver badges 37 37 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Returns an associative array of strings that corresponds to the fetched row, or false if there are no more rows.

If two or more columns of the result have the same field names, the last column will take precedence. Note : Field names returned by this function are case-sensitive. Submit a Pull Request Report a Bug. Warning This extension was deprecated in PHP 5. Parameters result The result resource that is being evaluated. Is your database that big? If not, then go with what is easier for you to use which is probably to fetch an associative array.

Another point to consider, if it is so big that there is a measurable difference then I would be getting a way from using functions like that all together. For example, the following query:. It only returns an associative array. Below are two methods commonly used in most php codes for fetch mysql data. Which is your choice? Asked By: Saimon Avazian. Your description goes here. View Comments. The application essay format depends on what kind of college you are applying to.

It can also depend on what kind of school you want to go to.



0コメント

  • 1000 / 1000