Ok thanks to Michael Nolan I was able to do what I needed. The final code is
this:
snip-snip
mysql_select_db($database_MBTTIENDA, $MBTTIENDA);
$query_prefs = SELECT * FROM mtmbt_prefs ORDER BY Pref_name ASC;
$prefs = mysql_query($query_prefs, $MBTTIENDA) or die(mysql_error());
$row_prefs =
Because you do mysql_fetch_assoc() once before going into your while loop.
Get rid of that first $row_prefs = mysql_fetch_assoc(...) line there and
it will work.
-Rasmus
On Fri, 12 Mar 2004, Elliot J. Balanza wrote:
Ok thanks to Michael Nolan I was able to do what I needed. The final code
On 12 Mar 2004 Elliot J. Balanza wrote:
.
$row_prefs = mysql_fetch_assoc($prefs);
.
while ($row_prefs = mysql_fetch_assoc($prefs)) {
.
and it works fine EXCEPT it wont show the first record of the query... any
ideas why?
Yes ... see the two lines quoted above. Each time you
Thanks guys... it works dandy now.
Vamp
[EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
On 12 Mar 2004 Elliot J. Balanza wrote:
.
$row_prefs = mysql_fetch_assoc($prefs);
.
while ($row_prefs = mysql_fetch_assoc($prefs)) {
.
and it works fine EXCEPT it
I have a csv file I'm importing, very simple setup. I think I must be
going blind from sitting infront of this puter for so long :-( I
can't seem to see what I did wrong. Here's my stuff:
Csv file:
01000170600010,
27362538462735,154154162549184
Basically, some lines have 2, some only have the
Jake --
...and then Jake McHenry said...
%
% I have a csv file I'm importing, very simple setup. I think I must be
% going blind from sitting infront of this puter for so long :-( I
% can't seem to see what I did wrong. Here's my stuff:
%
% Csv file:
%
% 01000170600010,
%
-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2003 5:09 PM
To: PHP General list
Cc: Jake McHenry
Subject: Re: [PHP] New problem - HELP!
Jake --
...and then Jake McHenry said...
%
% I have a csv file I'm importing, very simple
-Original Message-
From: Jake McHenry [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2003 6:12 PM
To: 'David T-G'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] New problem - HELP!
-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]
Sent: Thursday
Jake McHenry mailto:[EMAIL PROTECTED]
on Thursday, November 13, 2003 3:12 PM said:
You asked is it empty or actually undefined...? I showed you the csv
file, and the output of print_r... You tell me.. I don't know.. Lol
:\
What you can do is try different comparisons for the if statement
Jake --
...and then Jake McHenry said...
%
% -Original Message-
% From: Jake McHenry [mailto:[EMAIL PROTECTED]
...
% -Original Message-
% From: David T-G [mailto:[EMAIL PROTECTED]
...
% ...and then Jake McHenry said...
...
% %
% % Basically, some lines have 2, some
if $datetest has a strict format, use $getdate[1]==$datetest, also put
$datetest=$day.month.$year out of the while loop, it doesn't need to
be recreated over and over.
Chad Winger wrote:
Yes, I'm STILL a newbie :) I've gotten pretty far in a few days thanks to
you all. I have a new question
-Original Message-
From: Chad Winger [mailto:[EMAIL PROTECTED]]
Sent: 19 September 2002 06:25
Still using my text file example, which has lines such as:
0706010102|01.01.02|16:00|Serie C2|02|Forlì|Florentia Viola|
0610010102|01.07.02|16:00|Serie C2|05|Florentia Viola|Gubbio|
Yes, I'm STILL a newbie :) I've gotten pretty far in a few days thanks to
you all. I have a new question for you, maybe this is a bit easier than my
last issue.
Still using my text file example, which has lines such as:
0706010102|01.01.02|16:00|Serie C2|02|Forlì|Florentia Viola|
Hello,
I have to transfer a directory and all it's files and subdirectories from one
server to another or from one acount to another, but I guess ftp_put or copy can not
do it ( This directory must not be compressed). ANY help woud be very very welcome.
: [PHP] new problem
Hello,
I have to transfer a directory and all it's files and subdirectories
from one server to another or from one acount to another, but I guess
ftp_put or copy can not do it ( This directory must not be compressed). ANY
help woud be very very welcome.
--
PHP General
Hi! I don't understand why PHP is having trouble with the odbc_exec. Is
there a bug in PHP code? Here's what the error messages said!
"SQL error: [OpenLink][ODBC][Driver]No key columns found for table
referenced by keyset driven cursor., SQL state IM909 in SQLExecDirect".
This show
[From BugDB]
ID: 10375
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Reproduceable crash
PHP Version: 4.0.4pl1
Assigned To:
Comments:
fixed in cvs, will not be in 4.0.5, but later releases.
Previous Comments:
linksw.com
-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 9:37 AM
To: [EMAIL PROTECTED]
Subject: [PHP] New problem with PHP "odbc_exec".
Hi! I don't understand why PHP is having trouble with the
odbc_exec. Is
there a bug
-
Andrew Hill - OpenLink Software
Director Technology Evangelism
Universal Data Access Integration
http://www.openlinksw.com
-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 9:37 AM
To: [EMAIL PROTECTED]
Subject:
19 matches
Mail list logo