Hi All,
I am getting the following error - Warning: mysql_fetch_assoc(): 3 is not a
valid MySQL result resource in
I think it has something to do with my Dreamweaver created code for a repeat
region. The head code is:
?php
if (!function_exists(GetSQLValueString)) {
function
Say for a photo album with photo paths taken from a database (or anything
from a database for that matter) how can you use PHP to repeat across for
three photos and then add a new row with the next 3 photos and so on and so
on?
Use a counter when iterating through the results
When counter % (modulus) 3=0 then write a new row
Mark
-Original Message-
From: Simon Allison [mailto:[EMAIL PROTECTED]
Sent: 22 April 2005 15:00
To: php-general@lists.php.net
Subject: [PHP] Repeat Accross, then down
Say for a photo
Hi php'ers,
I have learnt alot in the last week in regards to php and listing the
rows of a table set.
I need help with a small challenge. I can retrieve rows from a database
table and list the results in HTML tr cell successfully. My challenge
is this.
I want to list the I.D (auto increment id
Hi, what you want to do is only echo the tr and /tr every 7 loops
through the records.
Untested example:
table
?
$i = 0;
$sql = SELECT id FROM table name;
$result = mysql_query($sql);
while($myrow = mysql_fetch_array($result))
{
$i++;
if($i == 1) { echo tr; }
echo
-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2002 02:50
I want to repeat the following code as many times as the user
specifies in the variable $_POST['x']. I then need to have
the output display as all the numbers found in the sequence.
How
I said this earlier but this time I'm saying it differently
because I semi-fixed it.
I want to repeat the following code as many times as the user
specifies in the variable $_POST['x']. I then need to have the output display as
all the numbers found in the sequence. How would I do this?
Hello Scott,
I took a look at your code, and have a solution for you.
Here's the code:
while ($row = mysql_fetch_array($result) )
{
if ($row[memberid] == $login_id)
{
// your code here :-)
}
}
$row = mysql_fetch_array($result); // Get one row
Thanks for your reply.
Unfortunately, the problem is not in getting the code to execute - I know it
is for two reasons:
1) the setcookie(...) is being triggered because I have cookie warnings
turned on in the browser, and it warns me that a new cookie is being
received and it shows me the
(it's been about 12 hours since I sent this, and havent seen it come
through, so I'm re-building/re-sending it... 'cause I need some help on
this)
I'm confused. I'm bemuttered. I'm pulling my hair out.
I have a page which processes a membership request, and includes the
following code:
from
10 matches
Mail list logo