On Wed, July 6, 2005 10:14 am, Moises Zaragoza said:
> I was trying to get a MySQL Loop to run in side of a loop but I have to
> reset the MySQL Pointer so that It can start again for as long as my loops
> goes on.
http://php.net/mysql_data_seek
--
Like Music?
http://l-i-e.com/artists.htm
--
P
[snip]
I was trying to get a MySQL Loop to run in side of a loop but I have to
reset the MySQL Pointer so that It can start again for as long as my
loops goes on.
[/snip]
Can we see some of your code , that way we may be able to help.
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
Hey,
My name is Moises Zaragoza
I was trying to get a MySQL Loop to run in side of a loop but I have to reset
the MySQL Pointer so that It can start again for as long as my loops goes on.
Thanks
For Samples of Web sites, Games, and resume please visit
http://moiseszaragoza.com
>> //Untested code.
>> $connection = @mysql_connect('localhost', 'USERNAME', 'PASSWORD') or
>> trigger_error(@mysql_error() . " connecting to mysql", E_USER_ERROR);
> mysql_error() *never* returns warnings... so why are you prepending an @ ?
If $connection is an invalid link, it most certainly doe
Richard Davey wrote:
Hello Steve,
Tuesday, December 14, 2004, 3:52:26 PM, you wrote:
SM> I would like to loop the multiple variables rather than put all the
SM> variables into a single variable with an array. I can not figure out how to
SM> do this.
I assume you have placed the MySQL query and chec
Greetings. I am trying to display looped information from a MySQL database
in a PHP file.
Loop
$name (witht a br />) then
$description
End of loop
I would like to loop the multiple variables rather than put all the
variables into a single variable with an array. I can not figure out how to
do
Richard Lynch wrote:
Steve Marquez wrote:
Greetings. I am trying to display looped information from a MySQL database
in a PHP file.
Loop
$name (witht a br />) then
$description
End of loop
I would like to loop the multiple variables rather than put all the
variables into a single variable with an a
Hello Steve,
Tuesday, December 14, 2004, 3:52:26 PM, you wrote:
SM> I would like to loop the multiple variables rather than put all the
SM> variables into a single variable with an array. I can not figure out how to
SM> do this.
I assume you have placed the MySQL query and checked the number of
Gareth Williams wrote:
$result = mysql_query("SELECT name, description FROM table");
while ($row = mysql_fetch_assoc($result))
{
echo "{$row['name']}$row['description']";
that will throw errors.
echo "{$row['name']}{$row['description']}";
would work, just like all of the following would also:
e
Steve Marquez wrote:
> Greetings. I am trying to display looped information from a MySQL database
> in a PHP file.
>
> Loop
>
> $name (witht a br />) then
> $description
>
> End of loop
>
> I would like to loop the multiple variables rather than put all the
> variables into a single variable wi
$result = mysql_query("SELECT name, description FROM table");
while ($row = mysql_fetch_assoc($result))
{
echo "{$row['name']}$row['description']";
}
On 14 Dec 2004, at 16:52, Steve Marquez wrote:
Greetings. I am trying to display looped information from a MySQL
database
in a PHP file.
Lo
> That brings up another question which I know actually belongs over on the
> MySQL board, but since the question arose here I thought I'd post here. I
> understood that MyISAM tables could not be relational. Do you mean that I
> can create JOINs between MyISAM tables? Maybe I need to do some more
On Wed, 2004-09-08 at 13:31, Robb Kerr wrote:
> That brings up another question which I know actually belongs over on the
> MySQL board, but since the question arose here I thought I'd post here. I
> understood that MyISAM tables could not be relational. Do you mean that I
> can create JOINs betwee
From: "Robb Kerr" <[EMAIL PROTECTED]>
That brings up another question which I know actually belongs over on the
MySQL board, but since the question arose here I thought I'd post here. I
understood that MyISAM tables could not be relational. Do you mean that I
can create JOINs between MyISAM tables?
[snip]
That brings up another question which I know actually belongs over on
the MySQL board, but since the question arose here I thought I'd post
here. I understood that MyISAM tables could not be relational. Do you
mean that I can create JOINs between MyISAM tables? Maybe I need to do
some more r
[snip]
I don't completely understand your terminology, but it's always faster
to get all of your data with a single query rather than a query per
loop. Of course, the difference is that it also requires more memory. In
general,
if you have the memory, use it. It will always be faster.
[/snip]
+1
On Wed, 8 Sep 2004 10:30:59 -0500, Jim Grill wrote:
>> Here's the question...
>>
>> I can either A) in the header or my page, generate a recordset of all of
>> the records in the related table and then loop through the recordset
>> creating an array of the fields I need and then later pull from it
Almost all the time (unless the data being worked with is extremely,
extremely large) PHP is much faster at manipulating data than MySQL. So
if you already have the record set pulled out of MySQL, you probably
want to go with PHP to manipulate it. Especially for repeating like
this, there is ze
--- Robb Kerr <[EMAIL PROTECTED]> wrote:
> Here's the question...
>
> I can either A) in the header or my page, generate a recordset
> of all of the records in the related table and then loop through
> the recordset creating an array of the fields I need and then
> later pull from it in the repeat
> I can either A) in the header or my page, generate a recordset of all of
> the records in the related table and then loop through the recordset
> creating an array of the fields I need and then later pull from it in the
> repeat region... or B) take the six lines of code Dreamweaver generates to
> Here's the question...
>
> I can either A) in the header or my page, generate a recordset of all of
> the records in the related table and then loop through the recordset
> creating an array of the fields I need and then later pull from it in the
> repeat region... or B) take the six lines of cod
Here's the scenario...
First, my HTTP Server (Apache), PHP Server and MySQL Server are on the same
machine - an Apple Xserve.
Second, I've got a page with a long repeat region reflecting a recordset
queried out of a MySQL table. The region also displays information obtained
from fields in a re
On further reflection, my first attempt works for the specific example but may
not in the general case. Try using a combination of max( ...id ) and min(
...val2 ) and add t1.val2 to the group by clause. This might work, but I've
deleted my test files now!
On Friday 01 Aug 2003 7:04 am, Nicholas
I think this does what you want. You can probably extend it to do the final
check for val3 vs. val2
select distinct t1.val1, max( t1.id ), t1.val2 from table as t1, table as t2
where t1.val2 <= t2.val2 group by t1.val1;
HTH
On Thursday 31 Jul 2003 3:22 pm, Petre Agenbag wrote:
> Hi List
>
did you also play with group by?
what does this return?
select * from `yourTable` group by `val1`
ciao SVEN
Petre Agenbag wrote:
> Hi List
>
> I've been trying to do something with one MySQL query, but I don't
> think it is possible, so, I would need to probably do multiple
> queries, and possib
Hi List
I've been trying to do something with one MySQL query, but I don't think
it is possible, so, I would need to probably do multiple queries, and
possibly have queries inside loops, but I am rather weary of that so,
I'd like your views/possible solutions to doing the following:
Consider thi
I need to run the if-construct below (containing a number of variables in
each "branch") using the 2 variables $table1 and $table2 in each run for
each combination
Is it array_walk or foreach ? (I "guess" that here I need a 2-dim-array, or
so, passing always these 2 variables with each run:
This
27 matches
Mail list logo