Plz any one tell me What is difference between mysql_fetch_assoc and mysql_fetch_array while both are return associtive array ?
mysql_fetch_array will return twice as much data!! and doesnt work well if you use foreach();
simply try it for each of them!!
[php]
foreach($yourArray as $k =>$v){
echo "$k => $v <br>";
}
[/php]
mysql fetch array function allows for two inputs the first is the result reasource, this is the only required field but you can enter what kind of array you would like, the default is MYSQL_BOTH which means it works as either kind of array or you can tell it to only use numbers or associative keys, the mysql fetch assoc function is the same as mysql fetch array with the MYSQL_ASSOC option.
Hey there
I have a dumb question....
Let's say i have a database full of 4000 people.... I select everything
from the database by:
$result = mysql_query("SELECT * FROM People");
Hello,
I seem to get an extra empty field in every 'mysql_fetch_array' command I issue. For example:
I have a simple table 'tblName':
ID Name
1 Jane
2 Joe
2 Doe
Hi, I'm new here and excuse me if this question was be here earlier.
I have a simple code
<html><body>
<?php
<?php
$link = mysql_connect("localhost", "user", "password")
or die("Grr: " ....
How do mysql_query() and mysql_fetch_assoc() actually work?
When I submit a query to a MySQL database it goes away, works out what
I requested and throws it back at me. When I submit a query...
I am having trouble getting this loop to do what I would like it to. I need to display information from a multidimensional array in order. The order has already
been sorted in the array using a...
I am trying to get the following code to work, and I am having some problems:
The code goes for actually 110 lines, but I have dismissed what is not needed.
The connection and all that works for...
Ok I have a problem! i have a mysql_fetch_assoc that does not recognize the NULL value of the column. however, i want this null to be picked up so i can use it. how can i go about doing that?
...
I am connecting to my database using Object oriented PHP. My query is returning results but at the end of my table,at the bottom of the page I keep having this error when I run my program: Warning:...
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...