a conundrum -- php/mysql script

2003-03-18 Thread Nicole Lallande
Dear all,

Have written a wrapper to Christian Novak's excellent biffwriter class 
which writes out excel files based on query to a mysql database.

A for loop, $zz=1; $zz =61; $zz++:
generates the id needed for the WHERE condition:
  $sql = SELECT $arv, DATE_FORMAT(date_rec,'%m-%d-%Y') as nice_date 
from arviContacts WHERE fid=$zz;

which is then passed to a function writeARV($sql);
which then loops through the database for all data pertaining to that 
id,  ($numoffields=mysql_num_fields($result);)
opens a file,
writes out the column heads and then
loops through the data and parses into an excel file.  

1.  The counter is being incremented correctly,
2.  all the files are created correctly,
3.  all the column heads are generated correctly
4.  and the data for  4 specific files do NOT get written in.  
5.  The file id numbers are 47,49,51 and 57 (all odd numbers but only 3 
are in sequence)
6.  These files are generated with NO DATA while all the other files are 
generated with the data.  
7.  If I explicity change the counter to one of these numbers and run 
the script singly, then these specific files get generated correctly 
WITH all the data.

I do not even know how to begin to debug this which is why I posted to 
both lists -- any pointers? clues?

TIA,

Nicole

--

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


default installation and security question

2003-03-03 Thread Nicole Lallande
Greetings,

I have been working with a software provider whose software db 
configuration uses the default mysql installation (ie, root, no 
password).  They contend that since the mysql server itself is not 
shared (ie, installed on a vps for a single user) that there is no need 
to add a password.  Are they correct?  All the documentation I have 
every read recommends at the very least immediately adding a password. 
Please advise.

Best regards,

Nicole



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


mysqldump or mysqlhotcopy?

2003-01-27 Thread Nicole Lallande
Greetings,

I would like to set up cron jobs on my servers to make backups of my 
databases:  

1.  The reference manual recommends mysqlhotcopy over mysqldump.  Any 
opinions?
2.  What format does mysqlhotcopy save in?  sql files? csv?
3.  Anyone else doing this with cron?  I'd like to see a sample command.

TIA  Best regards,

Nicole




-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



attempting to use DATE_FORMAT function in a SELECT STATEMENT

2002-11-30 Thread Nicole Lallande
I am trying to format a TIMESTAMP column on output by using the 
DATE_FORMAT() function:

Can someone tell me why this does not change the format - no error 
message - just does not do anything?

$sql = SELECT * from arviContacts WHERE fid=$zz AND 
DATE_FORMAT(date_rec,'%Y-%m-%d %T');

I have also tried

$sql = SELECT *,DATE_FORMAT(date_rec,'%Y-%m-%d %T') from arviContacts 
WHERE fid=$zz; and various other permutations which actually result in 
error messagets.

I think I am missing a basic concept here

TIA,

Nicole

Resources accessed:  mysql manual, MySQL Cookbook, MySQL Reference Manual


--

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766




-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: attempting to use DATE_FORMAT function in a SELECT STATEMENT

2002-11-30 Thread Nicole Lallande
Thanks very much Robert, that worked.  I was surprised at the effect of 
the '*'.


Best regards,

Nicole

Robert Kostko wrote:

Hi, Nicole

IMHO after *  all additional field statements  DATE_FORMAT(date_rec,'%Y-%m-%d %T') are ignored. Try to list all neccessary fields after SELECT and give an alias to DATE_FORMAT(date_rec,'%Y-%m-%d %T') for example:

SELECT [fld_1], [fld_2], ...,[fld_n],   DATE_FORMAT(date_rec,'%Y-%m-%d %T') as nice_date FROM arviContacts 
WHERE fid=$zz; 

After that You'll have $row[nice_date] when You fetch mysql result  

Regards,
Robert


- Original Message - 
From: Nicole Lallande [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 30, 2002 11:38 PM
Subject: attempting to use DATE_FORMAT function in a SELECT STATEMENT


 

I am trying to format a TIMESTAMP column on output by using the 
DATE_FORMAT() function:

Can someone tell me why this does not change the format - no error 
message - just does not do anything?

$sql = SELECT * from arviContacts WHERE fid=$zz AND 
DATE_FORMAT(date_rec,'%Y-%m-%d %T');

I have also tried

$sql = SELECT *,DATE_FORMAT(date_rec,'%Y-%m-%d %T') from arviContacts 
WHERE fid=$zz; and various other permutations which actually result in 
error messagets.

I think I am missing a basic concept here

TIA,

Nicole

Resources accessed:  mysql manual, MySQL Cookbook, MySQL Reference Manual


--

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766




-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

   



 


--

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766





-
Before posting, please check:
  http://www.mysql.com/doc/ (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




can i use mysql functions to sort an alpha-numeric description alphabetically?

2002-02-23 Thread Nicole Lallande

Hi,

I have looked at the online documentation and the mysql books that I 
have but can find no answer.  I have a field that looks like this:

(8+2) Landscape

I want to sort on the alphabetic characters.  My mysql query does an 
order by this field and that returns a numeric order (which for me is 
not terribly useful.)

So - is there a function or way I can sort this array alphabetically 
rather than numerically?

Thanks,

Nicole
-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: can i use mysql functions to sort an alpha-numeric description alphabetically?

2002-02-23 Thread Nicole Lallande

Sorry Dan, I had actually replied to Steve who had asked the same 
question but I forgot to reply to the list with this:

here is the query:

select catval,catdescr from embiteccat
 where catzid=$zid and catlid=$lid and catunder=$cat order by 
catdescr;

Here is a some data:

36,1,1,,0,0,2(12+1) Long,,,0,0,prodsku,,6,:6:36:,0,0,1,10
38,1,1,,0,0,24+1 Landscape,,,0,0,prodsku,,6,:6:38:,0,0,1,10
41,1,1,,0,0,6 Portrait,,,0,0,prodsku,,6,:6:41:,0,0,1,10
43,1,1,,0,0,24+1 Long,,,0,0,prodsku,,6,:6:43:,0,0,1,10
44,1,1,,0,0,2(24+1) X-Long,,,0,0,prodsku,,6,:6:44:,0,0,1,10

where catdesc is the 7th field (ie, 2(12+1) Long etc. So far all I can 
think of is that I have to load it into an array, sort the array with 
some php function or grep and then spit it out...

So - yes you are correct - I want everything before the alphabetic 
characters, (number, parenthesis, + sign) to be ignored and then to sort 
by the alpha.

TIA,

Nicole

DL Neil wrote:

 Hi Nicole,
 Perhaps it's me, but I'm having trouble following you - as I did with the question 
I've just finished responding
 to...
 
 
I have looked at the online documentation and the mysql books that I
have but can find no answer.  I have a field that looks like this:

(8+2) Landscape

 
 I take it that this is the data value stored in the field. What does the schema look 
like?
 
 
I want to sort on the alphabetic characters.  My mysql query does an
order by this field and that returns a numeric order (which for me is
not terribly useful.)

 
 What do you mean by numeric order? If there was another row containing:
 
 (72+18) Landscape
 
 Then it would likely appear before the row you mentioned - and not in a numeric 
sequence at all.
 
 Do you mean that you want the parentheses, the digits, the plus sign, AND the space 
character ignored for the
 purposes od the sequence, and thereafter that the values should be treated as alpha?
 
 Is there any possibility of numerics appearing after the first alpha character? 
Would that matter or would they
 have to be ignored as well?
 
 
So - is there a function or way I can sort this array alphabetically
rather than numerically?

 
 Yes there are various ways and means, right up to the 'expensive' regular expression 
function. I think we can
 solve this one quickly enough - given a good understanding so we don't end up 
chasing red herrings!
 
 Please post the query you are using currently, together with a few rows of output. 
Then highlight the problem by
 showing the sequence that you would prefer to see.
 
 Please advise,
 =dn
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 
 


-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Imagenes en mysql

2001-06-28 Thread Nicole Lallande

Carlos - si - las imagenes se pueden almanecer en mysql - el typo de
campo es 'blob'.

Nicole


[EMAIL PROTECTED] wrote:
 
 Hola,
 para un desarrollo en java con acceso a una base de
 datos en MySQL, necesitaria saber si alguien ha
 implementado imagenes con MySQL? . ¿Se pueden almacenar
 imagenes en esta base de datos, cómo debe ser el tipo
 de campo?
 
 Gracias,
 
 Carlos Miglioli
 Gobierno de Mendoza ARG.
 [EMAIL PROTECTED]
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Recommedations

2001-05-27 Thread Nicole Lallande

Mike - if you are familiar try Fishcart - http://fishcart.org/ - here's
what I like about it:

ease of implementation
documentation
mailing list support

for a very robust PERL shopping cart program go to http://akopia.com/ -
this is what minivend finally morphed to - after being purchased by
RedHat.

Both of these carts work with several dbs including mysql.

HTH,

Nicole


MikeBlezien wrote:
 
 Hello All,
 
 I hoping someone on the list maybe able to offer some recommendations on a good
 MySQL backend database shopping cart with advance search features. One of our
 client's has out-grown their current cart, which using DBM data files. And it
 would cost too much to port it MySQL. They prefer a Perl written program but are
 open to PHP if it meets there needs. This would be on UN*X system, a Sun/Solaris
 server. With MySQL 3.23.32 currently installed.
 
 Thanks,
 
 Mike(mickalo)Blezien
 
 Thunder Rain Internet Publishing
 Providing Internet Solutions that work!
 http://www.thunder-rain.com
 Tel: 1(225) 686-2002
 =
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 

Nicole Lallande
[EMAIL PROTECTED]
760.753.6766


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php