Hello,
Can someone please help me to put the results of a query to an array. Never
done this before:
$sql = SELECT sortteri,jouk_id,jouk_nimi FROM x_table ORDER BY sortteri
ASC;
$result = mysql_query($sql);
$num = mysql_num_rows($result);
$cur = 1;
//create empty array that contains an array
William Stokes wrote:
Hello,
Can someone please help me to put the results of a query to an array. Never
done this before:
$sql = SELECT sortteri,jouk_id,jouk_nimi FROM x_table ORDER BY sortteri
ASC;
$result = mysql_query($sql);
$num = mysql_num_rows($result);
$cur = 1;
//create empty
On Wed, April 26, 2006 1:39 am, William Stokes wrote:
Can someone please help me to put the results of a query to an array.
There are only a few thousand tutorials on this on the 'net...
Never
done this before:
$sql = SELECT sortteri,jouk_id,jouk_nimi FROM x_table ORDER BY
sortteri
ASC;
Will,
Seems to me like you've just done it! Here's another way of doing it that
will utilize mysql_fetch_assoc() to allow your query to dictate the elements
of the array. Keep in mind, I haven't tested this, but since I'm not
entirely sure what you are asking the list, I'll offer it anyway ;-)
Ooopps.
I just did have array too many. This did the append corretly:
$arr[Team$cur] = array(id = $id, sort = $srt, jnimi = $nimi);
-Will
Joe Wollard [EMAIL PROTECTED] kirjoitti
viestissä:[EMAIL PROTECTED]
Will,
Seems to me like you've just done it! Here's another way of doing it that
will
5 matches
Mail list logo