Re: [PHP-DB] CMS Translation Systen: DB Desiging

2004-10-18 Thread M Saleh EG
I'd always preffer to keep language stuff in files instead of DB.

A question or a problem u might face later is: How are you going to
store the text in the proper Charset in ur tables?

I'd do it this way. 
-A field in DB to keep the current default language
-Every module in the app should have it's own language pack
-Write a set of routines to read my language files and return the right values.

With DB-Method u gotta hit a trip to ur database for every element or
every language pack.


Try checking phpMyAdmins way of managing language or any other
application to get inspired.

On Sun, 17 Oct 2004 23:23:03 -0300, bruno b b magalhaes
<[EMAIL PROTECTED]> wrote:
> Hi everone,
> 
> I am building a multilingual content management systen, and I am studying the best 
> way
> to have the content translated, with minimal Database queries and load.
> 
> So I have:
> 
> CONTENTS
> contentId
> contentCreationDate
> contentModificationDate
> translationId
> contentStatus
> 
> CATEGORIES
> categoryId
> categoryParentId
> categoryModulePath
> translationId
> categoryStatus
> 
> TRANSLATIONS
> translationId
> field01
> field02
> field03
> field04
> field05
> field06
> field07
> field08
> field09
> field10
> translationLanguage
> translationStatus
> 
> So just run a simple join query:
> SELECT contents.*,translations.* FROM contents,translations WHERE
> contents.translationId=translations.translationId AND
> translations.translationLanguage='en-uk' AND translations.translationStatus = 1
> 
> Or with categories:
> SELECT categories.*,translations.* FROM categories,translations WHERE
> categories.translationId=translations.translationId AND
> translations.translationLanguage='en-uk' AND translations.translationStatus = 1 AND
> categories.categoryModulePath='products'
> 
> Any better idea to handle that?
> 
> Regards,
> Bruno B B Magalhaes
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
M.Saleh.E.G
97150-4779817

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] mysql error and resource ID:

2004-10-18 Thread John Holmes
Stuart Felenstein wrote:
First time setting something like this up. So probably
making some major mistakes.
Anyway I get this message : "mysql_error(Resource id
#2)"
[snip]
echo " . mysql_error($link)";
Read the above line or use an editor that does syntax highlighting. 
Also, you'll want to get the error before you run the rollback() function.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] CMS Translation Systen: DB Desiging

2004-10-18 Thread Bruno B B Magalhães
Hi,
I do have a flat file with all the translations for the interface and 
everything, but the problem is de dynamic content that must be 
multilingual...

Regards,
Bruno
On Oct 18, 2004, at 5:29 AM, M Saleh EG wrote:
I'd always preffer to keep language stuff in files instead of DB.
A question or a problem u might face later is: How are you going to
store the text in the proper Charset in ur tables?
I'd do it this way.
-A field in DB to keep the current default language
-Every module in the app should have it's own language pack
-Write a set of routines to read my language files and return the 
right values.

With DB-Method u gotta hit a trip to ur database for every element or
every language pack.
Try checking phpMyAdmins way of managing language or any other
application to get inspired.
On Sun, 17 Oct 2004 23:23:03 -0300, bruno b b magalhaes
<[EMAIL PROTECTED]> wrote:
Hi everone,
I am building a multilingual content management systen, and I am 
studying the best way
to have the content translated, with minimal Database queries and 
load.

So I have:
CONTENTS
contentId
contentCreationDate
contentModificationDate
translationId
contentStatus
CATEGORIES
categoryId
categoryParentId
categoryModulePath
translationId
categoryStatus
TRANSLATIONS
translationId
field01
field02
field03
field04
field05
field06
field07
field08
field09
field10
translationLanguage
translationStatus
So just run a simple join query:
SELECT contents.*,translations.* FROM contents,translations WHERE
contents.translationId=translations.translationId AND
translations.translationLanguage='en-uk' AND 
translations.translationStatus = 1

Or with categories:
SELECT categories.*,translations.* FROM categories,translations WHERE
categories.translationId=translations.translationId AND
translations.translationLanguage='en-uk' AND 
translations.translationStatus = 1 AND
categories.categoryModulePath='products'

Any better idea to handle that?
Regards,
Bruno B B Magalhaes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
M.Saleh.E.G
97150-4779817
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] CMS Translation Systen: DB Desiging

2004-10-18 Thread M Saleh EG
Then use the some variable in ur language files. That is templated
language elements that could hold variable in them.

e.g.
The article {ARTICLE_SUBJECT} was successfuly deleted !

It's dynamic now!

On Mon, 18 Oct 2004 09:10:35 -0200, Bruno B B Magalhães
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I do have a flat file with all the translations for the interface and
> everything, but the problem is de dynamic content that must be
> multilingual...
> 
> Regards,
> Bruno
> 
> 
> 
> On Oct 18, 2004, at 5:29 AM, M Saleh EG wrote:
> 
> > I'd always preffer to keep language stuff in files instead of DB.
> >
> > A question or a problem u might face later is: How are you going to
> > store the text in the proper Charset in ur tables?
> >
> > I'd do it this way.
> > -A field in DB to keep the current default language
> > -Every module in the app should have it's own language pack
> > -Write a set of routines to read my language files and return the
> > right values.
> >
> > With DB-Method u gotta hit a trip to ur database for every element or
> > every language pack.
> >
> >
> > Try checking phpMyAdmins way of managing language or any other
> > application to get inspired.
> >
> > On Sun, 17 Oct 2004 23:23:03 -0300, bruno b b magalhaes
> > <[EMAIL PROTECTED]> wrote:
> >> Hi everone,
> >>
> >> I am building a multilingual content management systen, and I am
> >> studying the best way
> >> to have the content translated, with minimal Database queries and
> >> load.
> >>
> >> So I have:
> >>
> >> CONTENTS
> >> contentId
> >> contentCreationDate
> >> contentModificationDate
> >> translationId
> >> contentStatus
> >>
> >> CATEGORIES
> >> categoryId
> >> categoryParentId
> >> categoryModulePath
> >> translationId
> >> categoryStatus
> >>
> >> TRANSLATIONS
> >> translationId
> >> field01
> >> field02
> >> field03
> >> field04
> >> field05
> >> field06
> >> field07
> >> field08
> >> field09
> >> field10
> >> translationLanguage
> >> translationStatus
> >>
> >> So just run a simple join query:
> >> SELECT contents.*,translations.* FROM contents,translations WHERE
> >> contents.translationId=translations.translationId AND
> >> translations.translationLanguage='en-uk' AND
> >> translations.translationStatus = 1
> >>
> >> Or with categories:
> >> SELECT categories.*,translations.* FROM categories,translations WHERE
> >> categories.translationId=translations.translationId AND
> >> translations.translationLanguage='en-uk' AND
> >> translations.translationStatus = 1 AND
> >> categories.categoryModulePath='products'
> >>
> >> Any better idea to handle that?
> >>
> >> Regards,
> >> Bruno B B Magalhaes
> >>
> >> --
> >> PHP Database Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
> > --
> > M.Saleh.E.G
> > 97150-4779817
> >
> 
> --
> 
> 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
M.Saleh.E.G
97150-4779817

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] backing up off of web host

2004-10-18 Thread Bastien Koert
Write a script that exports to text and then zips the file. You can then 
download the file or have it emailed.

Its a good idea, you should take control of your data.
Bastien

From: Matthew Perry <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-DB] backing up off of web host
Date: Sun, 17 Oct 2004 20:36:38 -0500
The MySQL database on my web host has only non-sensitive information.
How bad an idea is it to have a backup copy emailed to me at a designated 
time so I don't have to depend on myself and the host for backups? I am 
worried this cheep web host will go out of business and take my backups 
with him.

The file will be rediculously huge  for email of course.
Is this the only problem?
What other solutions do I have that do not depend on my web host?
Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] RFC on how to best submit a bug report

2004-10-18 Thread Norland, Martin
I'm posting to this list mainly because I'm not 100% sure that I have a
bug (who ever is, right?).  I'm doing an export of some relational data
into XML, which amounts to many many queries in a database with the
information basically being written straight out.  Initially it was done
using our own custom class that extends PEAR DB - but I've since brought
it down to straight mysql function calls with the same results.
 
The process itself seems cpu bound if anything, there is still memory
available (initially it did hit the max execution and memory limits -
when they were severely low, it doesn't at 5min and 128mb*) and the disk
access is reasonable.  I get a segfault in the Apache error log, and
have a backtrace of its results running it in gdb - but don't really
know what exactly to file alongside my bug (how to describe it in a way
someone will try to fix it).
 
Has anyone had similar issues and done any other kind of testing or
thought of other ways to hone in on the actual problem before submitting
a bug?  I've got a few general theories but nothing particularly
concrete or testable.  This doesn't happen until it's done a fair bit of
processing - but I can't find anything indicating why it decides to
fail.  My best "magic bullet" theory right now is along the lines of
some general idea that perhaps PHP gets confused when you've loaded up a
class a huge amount of times (even  though I'm destroying their
instances [it's in a recursive function call**]) - but that's pretty
much just my arbitrary "I'm angry and frustrated maybe this is it" with
no real backing.
 
I have, of course, upgraded to CVS PHP and the segfault still exhibits
itself.  Any suggestions would be greatly appreciated.
 
Notes:
* the calls I was doing initially pulled the entire result set, which
for an export was burning a lot of memory.  I haven't dropped the memory
limit yet because I don't see how it will help me define the problem,
but I'm sure it's down to something a lot more reasonable :)
** no, it's not infinitely looping.  It's dumping patient data, e.g. it
dumps a patient, a bunch of related records, and continues.


- Martin Norland, Database / Web Developer, International Outreach x3257

The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital. 

 


[PHP-DB] Showing all mysql query results!

2004-10-18 Thread Juan Stiller
Hi, im using this script, to show all entrys of a
mysql database on a flash movieclip, but i was told at
flash forums, that this code is not ok, because its
showing only the last entry not all of them, maybe you
someone can recommend what to add to this little
script?.


No se pudo conectar " .
"al servidor MySQL." );
exit();
}

if (! @mysql_select_db("clientes") ) {
echo( "No se puede encontrar " .
"la base de datos clientes!" );
exit();
}

// Request all data
$result1 = mysql_query("select * from
clientesnuevos");

print "Results=";
echo "Clientes agregados:";

while($row=mysql_fetch_array($result1, MYSQL_ASSOC))
{
$id=$row["id"];
echo "&Id=$id";
$apellido=$row["apellidoclientesnuevos"];
echo "&Apellido=$apellido";

$nombre=$row["nombreclientesnuevos"];
echo "&Nombre=$nombre";

$dni=$row["dniclientesnuevos"];
echo "&Dni=$dni";

$telefono=$row["telefonoclientesnuevos"];
echo "&Telefono=$telefono";

$dia=$row["diacitaclientesnuevos"];
echo "&Dia=$dia";

$mes=$row["mescitaclientesnuevos"];
echo "&Mes=$mes";

$ano=$row["anocitaclientesnuevos"];
echo "&Ano=$ano";

$hora=$row["horacitaclientesnuevos"];
echo "&Hora=$hora";

$minutos=$row["minutoscitaclientesnuevos"];
echo "&Minutos=$minutos";

$abogado=$row["abogadoclientesnuevos"];
echo "&Abogado=$abogado";

$asunto=$row["asuntoclientesnuevos"];
echo "&Asunto=$asunto";

$donde=$row["dondeclientesnuevos"];
echo "&Donde=$donde";
}
?>

Thanks 
Emilio 






___ 
¡Llevate a Yahoo! en tu Unifón! 
Ahora podés usar Yahoo! Messenger en tu Unifón, en cualquier momento y lugar. 
Encontrá más información en: http://ar.mobile.yahoo.com/sms.html 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Showing all mysql query results!

2004-10-18 Thread Norland, Martin

A quick glance says that's all perfectly right, I would run the query on the mysql 
command line to be sure it's really giving more than 1 result - but I can suggest two 
things:

1) be sure to mysql_free_result($result) afterwards if you're done with the query but 
your script will still be doing anything. You really do want to do that because it 
tells mysql you're done with that so it can release the memory - PHP doesn't actually 
use the memory for that resultset, it just holds a result id that it uses to get the 
results from mysql (so best to let mysql have its memory back as soon as you're done).

2) you will save yourself a fair amount of effort and readability, if you don't need 
those variables other than to print, to change things like so:
---
$apellido=$row["apellidoclientesnuevos"];
echo "&Apellido=$apellido";
--- becomes ---
echo "&Apellido={$row['appellidoclientesnuevos']}";
---
(you don't need to use ', " works too - I find ' more legible here)

This may also reduce confusion if you start thinking that the database field is 
holding just names, instead of names of new clients (e.g. you accidentally paste it 
elsewhere for use and keep pulling only from the new clients table).

Are you perhaps storing clients in that table temporarily, so it rarely has many 
clients in it?  That could explain the behaviour as well.

- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent those of St. 
Jude Children's Research Hospital.


-Original Message-
From: Juan Stiller [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 11:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Showing all mysql query results!


Hi, im using this script, to show all entrys of a
mysql database on a flash movieclip, but i was told at
flash forums, that this code is not ok, because its
showing only the last entry not all of them, maybe you
someone can recommend what to add to this little
script?.


No se pudo conectar " .
"al servidor MySQL." );
exit();
}

if (! @mysql_select_db("clientes") ) {
echo( "No se puede encontrar " .
"la base de datos clientes!" );
exit();
}

// Request all data
$result1 = mysql_query("select * from
clientesnuevos");

print "Results=";
echo "Clientes agregados:";

while($row=mysql_fetch_array($result1, MYSQL_ASSOC))
{
$id=$row["id"];
echo "&Id=$id";
$apellido=$row["apellidoclientesnuevos"];
echo "&Apellido=$apellido";

$nombre=$row["nombreclientesnuevos"];
echo "&Nombre=$nombre";

$dni=$row["dniclientesnuevos"];
echo "&Dni=$dni";

$telefono=$row["telefonoclientesnuevos"];
echo "&Telefono=$telefono";

$dia=$row["diacitaclientesnuevos"];
echo "&Dia=$dia";

$mes=$row["mescitaclientesnuevos"];
echo "&Mes=$mes";

$ano=$row["anocitaclientesnuevos"];
echo "&Ano=$ano";

$hora=$row["horacitaclientesnuevos"];
echo "&Hora=$hora";

$minutos=$row["minutoscitaclientesnuevos"];
echo "&Minutos=$minutos";

$abogado=$row["abogadoclientesnuevos"];
echo "&Abogado=$abogado";

$asunto=$row["asuntoclientesnuevos"];
echo "&Asunto=$asunto";

$donde=$row["dondeclientesnuevos"];
echo "&Donde=$donde";
}
?>

Thanks 
Emilio 






___ 
¡Llevate a Yahoo! en tu Unifón! 
Ahora podés usar Yahoo! Messenger en tu Unifón, en cualquier momento y lugar. 
Encontrá más información en: http://ar.mobile.yahoo.com/sms.html 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Refreshing Problem

2004-10-18 Thread Ganesh Babu Nallamothu, Integra-India
Dear All,

First time I have entered the values to DB through form. If I refresh once
again one more time it is getting inserted. How to solve this problem?


Ganesh

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Refreshing Problem

2004-10-18 Thread Norland, Martin
When the page refreshes, the data is reposted.  You basically need to be
able to track whether this is happening, or prevent it from easily
happening.

One easy solution is to send a header("Location: somewhere-safe.php")
after a successful post.  This way when the user hits refresh, it should
just refresh that safe page.  Theoretically they can still use their
back button and still give you the problem, but it will at least reduce
your problems in the interim if your application supports it.  You'll
have to store feedback in a session variable or otherwise keep it handy
for them, however.

Better would be to store a timestamp in a hidden field, and make that +
userid (or some other identifier that allows two different users to
submit simultaneously) a unique index in your database.  If they repost
the data, mysql will error because that combination is already in your
database.

You can obviously think of a million solutions - tracking sessions/pages
etc. - get creative to however will best fit or benefit your app!

- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
From: Ganesh Babu Nallamothu, Integra-India
[mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 11:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Refreshing Problem 


Dear All,

First time I have entered the values to DB through form. If I refresh
once again one more time it is getting inserted. How to solve this
problem?


Ganesh

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Books

2004-10-18 Thread Huy Ton That
Can anyone recommend me any good books that they return to for both
information learning PHP & maybe MySQL and/or reference?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Books

2004-10-18 Thread bbonkosk
In all seriousness...
http://www.php.net/manual/en/
- and -
http://dev.mysql.com/doc/mysql/en/index.html

are increible resources, no real need to throw money out for the books...

- Original Message -
From: Huy Ton That <[EMAIL PROTECTED]>
Date: Monday, October 18, 2004 1:19 pm
Subject: [PHP-DB] Books

> Can anyone recommend me any good books that they return to for both
> information learning PHP & maybe MySQL and/or reference?
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Books

2004-10-18 Thread Gabino Travassos
I like PHP Functions: Essential Reference from New Riders. It's pretty much 
redundant to the online manual: http://www.php.net/manual/en/ , but I can 
read it waiting for my bus. It's $50 US though.

The O'Reilly book Web Database Applications with PHP and mySQL is also 
handy. http://www.oreilly.com/catalog/webdbapps2/


- Original Message - 
From: "Huy Ton That" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 18, 2004 11:19 AM
Subject: [PHP-DB] Books


Can anyone recommend me any good books that they return to for both
information learning PHP & maybe MySQL and/or reference?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Showing all mysql query results!

2004-10-18 Thread Juan Stiller
Ok, i just followed your advice for make the code
easier to read, it looks good, and yes it works ok
too.

I´ve tried it, and yes it shows more than 1 entry, but
i cant make flash to show them, im sure something on
flash must be wrong or missing, there is no fault on
the php code, so i might research a little more on the
flash part.

Do you know some good tutorial for this?

Thanks for your response.


Juan.


 --- "Norland, Martin" <[EMAIL PROTECTED]>
escribió: 
> 
> A quick glance says that's all perfectly right, I
> would run the query on the mysql command line to be
> sure it's really giving more than 1 result - but I
> can suggest two things:
> 
> 1) be sure to mysql_free_result($result) afterwards
> if you're done with the query but your script will
> still be doing anything. You really do want to do
> that because it tells mysql you're done with that so
> it can release the memory - PHP doesn't actually use
> the memory for that resultset, it just holds a
> result id that it uses to get the results from mysql
> (so best to let mysql have its memory back as soon
> as you're done).
> 
> 2) you will save yourself a fair amount of effort
> and readability, if you don't need those variables
> other than to print, to change things like so:
> ---
> $apellido=$row["apellidoclientesnuevos"];
> echo "&Apellido=$apellido";
> --- becomes ---
> echo "&Apellido={$row['appellidoclientesnuevos']}";
> ---
> (you don't need to use ', " works too - I find '
> more legible here)
> 
> This may also reduce confusion if you start thinking
> that the database field is holding just names,
> instead of names of new clients (e.g. you
> accidentally paste it elsewhere for use and keep
> pulling only from the new clients table).
> 
> Are you perhaps storing clients in that table
> temporarily, so it rarely has many clients in it? 
> That could explain the behaviour as well.
> 
> - Martin Norland, Database / Web Developer,
> International Outreach x3257
> The opinion(s) contained within this email do not
> necessarily represent those of St. Jude Children's
> Research Hospital.
> 
> 
> -Original Message-
> From: Juan Stiller [mailto:[EMAIL PROTECTED]
> 
> Sent: Monday, October 18, 2004 11:07 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Showing all mysql query results!
> 
> 
> Hi, im using this script, to show all entrys of a
> mysql database on a flash movieclip, but i was told
> at
> flash forums, that this code is not ok, because its
> showing only the last entry not all of them, maybe
> you
> someone can recommend what to add to this little
> script?.
> 
> 
>  $conn = @mysql_connect("***", "***", "");
> 
> if (!$conn) {
> echo( "No se pudo conectar " .
> "al servidor MySQL." );
> exit();
> }
> 
> if (! @mysql_select_db("clientes") ) {
> echo( "No se puede encontrar " .
> "la base de datos clientes!" );
> exit();
> }
> 
> // Request all data
> $result1 = mysql_query("select * from
> clientesnuevos");
> 
> print "Results=";
> echo "Clientes agregados:";
> 
> while($row=mysql_fetch_array($result1, MYSQL_ASSOC))
> {
> $id=$row["id"];
> echo "&Id=$id";
> $apellido=$row["apellidoclientesnuevos"];
> echo "&Apellido=$apellido";
> 
> $nombre=$row["nombreclientesnuevos"];
> echo "&Nombre=$nombre";
> 
> $dni=$row["dniclientesnuevos"];
> echo "&Dni=$dni";
> 
> $telefono=$row["telefonoclientesnuevos"];
> echo "&Telefono=$telefono";
> 
> $dia=$row["diacitaclientesnuevos"];
> echo "&Dia=$dia";
> 
> $mes=$row["mescitaclientesnuevos"];
> echo "&Mes=$mes";
> 
> $ano=$row["anocitaclientesnuevos"];
> echo "&Ano=$ano";
> 
> $hora=$row["horacitaclientesnuevos"];
> echo "&Hora=$hora";
> 
> $minutos=$row["minutoscitaclientesnuevos"];
> echo "&Minutos=$minutos";
> 
> $abogado=$row["abogadoclientesnuevos"];
> echo "&Abogado=$abogado";
> 
> $asunto=$row["asuntoclientesnuevos"];
> echo "&Asunto=$asunto";
> 
> $donde=$row["dondeclientesnuevos"];
> echo "&Donde=$donde";
> }
> ?>
> 
> Thanks 
> Emilio 
> 
> 
>   
> 
>   
>   
> ___ 
> ¡Llevate a Yahoo! en tu Unifón! 
> Ahora podés usar Yahoo! Messenger en tu Unifón, en
> cualquier momento y lugar. 
> Encontrá más información en:
> http://ar.mobile.yahoo.com/sms.html 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>  

Correo Yahoo! - 6 MB, tecnología antispam ¡gratis! 
 Suscribite ya http://correo.yahoo.com.ar/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] setting root password

2004-10-18 Thread Perry, Matthew (Fire Marshal's Office)
I have tried the step-by-step methods listed on mysql.com for setting a root
password for my local server but I keep getting the message "you must have
privileges to update tables in the mysql database to be able to change
passwords for others".   What could I be doing incorrectly?

-Matt



Re: [PHP-DB] setting root password

2004-10-18 Thread dpgirago
If you haven't yet deleted the localhost root account, you can log onto 
the mysql client with:
mysql> mysql -uroot -p

then press enter again when it prompts you for a password.

You should now be able to manage all your account info.

dave






"Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]>

10/18/2004 01:28 PM



 

To:
[EMAIL PROTECTED]
cc:





Subject:
[PHP-DB] setting root password



I have tried the step-by-step methods listed on mysql.com for setting a 
root
password for my local server but I keep getting the message "you must have
privileges to update tables in the mysql database to be able to change
passwords for others".   What could I be doing incorrectly?

-Matt





RE: [PHP-DB] Showing all mysql query results!

2004-10-18 Thread Norland, Martin
No, sorry - I haven't ever had to use flash, let alone use it to interface to php.

Check which result flash is seeing - is it only seeing the first, or is it only seeing 
the last?  It looks like you're building a query string to pass to it, but you're not 
presently setting the data as arrays (e.g. 
"&Apellido[]={$row['appellidoclientesnuevos']}") - which would mean it only gets to 
see one result set.

However, you don't want to be passing the entire results of your database query in a 
$_GET string to this flash script - if that is what you're doing - there is certainly 
a better/preferred way to get this info into flash.

- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent those of St. 
Jude Children's Research Hospital.


-Original Message-
From: Juan Stiller [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 1:25 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Showing all mysql query results!


Ok, i just followed your advice for make the code
easier to read, it looks good, and yes it works ok
too.

I´ve tried it, and yes it shows more than 1 entry, but
i cant make flash to show them, im sure something on
flash must be wrong or missing, there is no fault on
the php code, so i might research a little more on the
flash part.

Do you know some good tutorial for this?

Thanks for your response.


Juan.


 --- "Norland, Martin" <[EMAIL PROTECTED]>
escribió: 
> 
> A quick glance says that's all perfectly right, I
> would run the query on the mysql command line to be
> sure it's really giving more than 1 result - but I
> can suggest two things:
> 
> 1) be sure to mysql_free_result($result) afterwards
> if you're done with the query but your script will
> still be doing anything. You really do want to do
> that because it tells mysql you're done with that so
> it can release the memory - PHP doesn't actually use
> the memory for that resultset, it just holds a
> result id that it uses to get the results from mysql
> (so best to let mysql have its memory back as soon
> as you're done).
> 
> 2) you will save yourself a fair amount of effort
> and readability, if you don't need those variables
> other than to print, to change things like so:
> ---
> $apellido=$row["apellidoclientesnuevos"];
> echo "&Apellido=$apellido";
> --- becomes ---
> echo "&Apellido={$row['appellidoclientesnuevos']}";
> ---
> (you don't need to use ', " works too - I find '
> more legible here)
> 
> This may also reduce confusion if you start thinking
> that the database field is holding just names,
> instead of names of new clients (e.g. you
> accidentally paste it elsewhere for use and keep
> pulling only from the new clients table).
> 
> Are you perhaps storing clients in that table
> temporarily, so it rarely has many clients in it?
> That could explain the behaviour as well.
> 
> - Martin Norland, Database / Web Developer,
> International Outreach x3257
> The opinion(s) contained within this email do not
> necessarily represent those of St. Jude Children's
> Research Hospital.
> 
> 
> -Original Message-
> From: Juan Stiller [mailto:[EMAIL PROTECTED]
> 
> Sent: Monday, October 18, 2004 11:07 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Showing all mysql query results!
> 
> 
> Hi, im using this script, to show all entrys of a
> mysql database on a flash movieclip, but i was told
> at
> flash forums, that this code is not ok, because its
> showing only the last entry not all of them, maybe
> you
> someone can recommend what to add to this little
> script?.
> 
> 
>  $conn = @mysql_connect("***", "***", "");
> 
> if (!$conn) {
> echo( "No se pudo conectar " .
> "al servidor MySQL." );
> exit();
> }
> 
> if (! @mysql_select_db("clientes") ) {
> echo( "No se puede encontrar " .
> "la base de datos clientes!" );
> exit();
> }
> 
> // Request all data
> $result1 = mysql_query("select * from
> clientesnuevos");
> 
> print "Results=";
> echo "Clientes agregados:";
> 
> while($row=mysql_fetch_array($result1, MYSQL_ASSOC))
> {
> $id=$row["id"];
> echo "&Id=$id";
> $apellido=$row["apellidoclientesnuevos"];
> echo "&Apellido=$apellido";
> 
> $nombre=$row["nombreclientesnuevos"];
> echo "&Nombre=$nombre";
> 
> $dni=$row["dniclientesnuevos"];
> echo "&Dni=$dni";
> 
> $telefono=$row["telefonoclientesnuevos"];
> echo "&Telefono=$telefono";
> 
> $dia=$row["diacitaclientesnuevos"];
> echo "&Dia=$dia";
> 
> $mes=$row["mescitaclientesnuevos"];
> echo "&Mes=$mes";
> 
> $ano=$row["anocitaclientesnuevos"];
> echo "&Ano=$ano";
> 
> $hora=$row["horacitaclientesnuevos"];
> echo "&Hora=$hora";
> 
> $minutos=$row["minutoscitaclientesnuevos"];
> echo "&Minutos=$minutos";
> 
> $abogado=$row["abogadoclientesnuevos"];
> echo "&Abogado=$abogado";
> 
> $asunto=$row["asuntoclientesnuevos"];
> echo "&Asunto=$asunto";
> 
> $donde=$row["dondeclientesnuevos"];
> echo "&Donde=$donde";
> }
> ?>
> 
> Thanks
> Emilio 
> 
> 
>   
> 

Re: [PHP-DB] Showing all mysql query results!

2004-10-18 Thread Gabino Travassos
Have you used Flash to get PHP before? It looks like you're making your 
variables fine, but are you using a loop to check whether the variables have 
loaded? After &Donde=$donde I would add a variable: &done=1, then check in 
Flash whether done==1. If it is, all your variables have loaded into Flash, 
if not then you have to loop and wait. It doesn't happen instantaneously. It 
takes maybe 1/5 or 1/2 a second, so...


- Original Message - 
From: "Norland, Martin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 18, 2004 12:45 PM
Subject: RE: [PHP-DB] Showing all mysql query results!


No, sorry - I haven't ever had to use flash, let alone use it to interface 
to php.

Check which result flash is seeing - is it only seeing the first, or is it 
only seeing the last?  It looks like you're building a query string to 
pass to it, but you're not presently setting the data as arrays (e.g. 
"&Apellido[]={$row['appellidoclientesnuevos']}") - which would mean it 
only gets to see one result set.

However, you don't want to be passing the entire results of your database 
query in a $_GET string to this flash script - if that is what you're 
doing - there is certainly a better/preferred way to get this info into 
flash.

- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent 
those of St. Jude Children's Research Hospital.

-Original Message-
From: Juan Stiller [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 1:25 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Showing all mysql query results!
Ok, i just followed your advice for make the code
easier to read, it looks good, and yes it works ok
too.
I´ve tried it, and yes it shows more than 1 entry, but
i cant make flash to show them, im sure something on
flash must be wrong or missing, there is no fault on
the php code, so i might research a little more on the
flash part.
Do you know some good tutorial for this?
Thanks for your response.
Juan.
--- "Norland, Martin" <[EMAIL PROTECTED]>
escribió:
A quick glance says that's all perfectly right, I
would run the query on the mysql command line to be
sure it's really giving more than 1 result - but I
can suggest two things:
1) be sure to mysql_free_result($result) afterwards
if you're done with the query but your script will
still be doing anything. You really do want to do
that because it tells mysql you're done with that so
it can release the memory - PHP doesn't actually use
the memory for that resultset, it just holds a
result id that it uses to get the results from mysql
(so best to let mysql have its memory back as soon
as you're done).
2) you will save yourself a fair amount of effort
and readability, if you don't need those variables
other than to print, to change things like so:
---
$apellido=$row["apellidoclientesnuevos"];
echo "&Apellido=$apellido";
--- becomes ---
echo "&Apellido={$row['appellidoclientesnuevos']}";
---
(you don't need to use ', " works too - I find '
more legible here)
This may also reduce confusion if you start thinking
that the database field is holding just names,
instead of names of new clients (e.g. you
accidentally paste it elsewhere for use and keep
pulling only from the new clients table).
Are you perhaps storing clients in that table
temporarily, so it rarely has many clients in it?
That could explain the behaviour as well.
- Martin Norland, Database / Web Developer,
International Outreach x3257
The opinion(s) contained within this email do not
necessarily represent those of St. Jude Children's
Research Hospital.
-Original Message-
From: Juan Stiller [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 11:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Showing all mysql query results!
Hi, im using this script, to show all entrys of a
mysql database on a flash movieclip, but i was told
at
flash forums, that this code is not ok, because its
showing only the last entry not all of them, maybe
you
someone can recommend what to add to this little
script?.

if (!$conn) {
echo( "No se pudo conectar " .
"al servidor MySQL." );
exit();
}
if (! @mysql_select_db("clientes") ) {
echo( "No se puede encontrar " .
"la base de datos clientes!" );
exit();
}
// Request all data
$result1 = mysql_query("select * from
clientesnuevos");
print "Results=";
echo "Clientes agregados:";
while($row=mysql_fetch_array($result1, MYSQL_ASSOC))
{
$id=$row["id"];
echo "&Id=$id";
$apellido=$row["apellidoclientesnuevos"];
echo "&Apellido=$apellido";
$nombre=$row["nombreclientesnuevos"];
echo "&Nombre=$nombre";
$dni=$row["dniclientesnuevos"];
echo "&Dni=$dni";
$telefono=$row["telefonoclientesnuevos"];
echo "&Telefono=$telefono";
$dia=$row["diacitaclientesnuevos"];
echo "&Dia=$dia";
$mes=$row["mescitaclientesnuevos"];
echo "&Mes=$mes";
$ano=$row["anocitaclientesnuevos"];
echo "&Ano=$ano";
$hora=$row["horacitaclientesnuevos"];
echo "&Hora=$hora";
$minutos=$row["min

RE: [PHP-DB] Showing all mysql query results!

2004-10-18 Thread Bastien Koert
check out
www.phpforflash.com
or
www.flashkit.com
bastien
From: Juan Stiller <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Showing all mysql query results!
Date: Mon, 18 Oct 2004 15:24:53 -0300 (ART)
Ok, i just followed your advice for make the code
easier to read, it looks good, and yes it works ok
too.
I´ve tried it, and yes it shows more than 1 entry, but
i cant make flash to show them, im sure something on
flash must be wrong or missing, there is no fault on
the php code, so i might research a little more on the
flash part.
Do you know some good tutorial for this?
Thanks for your response.
Juan.
 --- "Norland, Martin" <[EMAIL PROTECTED]>
escribió:
>
> A quick glance says that's all perfectly right, I
> would run the query on the mysql command line to be
> sure it's really giving more than 1 result - but I
> can suggest two things:
>
> 1) be sure to mysql_free_result($result) afterwards
> if you're done with the query but your script will
> still be doing anything. You really do want to do
> that because it tells mysql you're done with that so
> it can release the memory - PHP doesn't actually use
> the memory for that resultset, it just holds a
> result id that it uses to get the results from mysql
> (so best to let mysql have its memory back as soon
> as you're done).
>
> 2) you will save yourself a fair amount of effort
> and readability, if you don't need those variables
> other than to print, to change things like so:
> ---
> $apellido=$row["apellidoclientesnuevos"];
> echo "&Apellido=$apellido";
> --- becomes ---
> echo "&Apellido={$row['appellidoclientesnuevos']}";
> ---
> (you don't need to use ', " works too - I find '
> more legible here)
>
> This may also reduce confusion if you start thinking
> that the database field is holding just names,
> instead of names of new clients (e.g. you
> accidentally paste it elsewhere for use and keep
> pulling only from the new clients table).
>
> Are you perhaps storing clients in that table
> temporarily, so it rarely has many clients in it?
> That could explain the behaviour as well.
>
> - Martin Norland, Database / Web Developer,
> International Outreach x3257
> The opinion(s) contained within this email do not
> necessarily represent those of St. Jude Children's
> Research Hospital.
>
>
> -Original Message-
> From: Juan Stiller [mailto:[EMAIL PROTECTED]
>
> Sent: Monday, October 18, 2004 11:07 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Showing all mysql query results!
>
>
> Hi, im using this script, to show all entrys of a
> mysql database on a flash movieclip, but i was told
> at
> flash forums, that this code is not ok, because its
> showing only the last entry not all of them, maybe
> you
> someone can recommend what to add to this little
> script?.
>
>
>  $conn = @mysql_connect("***", "***", "");
>
> if (!$conn) {
> echo( "No se pudo conectar " .
> "al servidor MySQL." );
> exit();
> }
>
> if (! @mysql_select_db("clientes") ) {
> echo( "No se puede encontrar " .
> "la base de datos clientes!" );
> exit();
> }
>
> // Request all data
> $result1 = mysql_query("select * from
> clientesnuevos");
>
> print "Results=";
> echo "Clientes agregados:";
>
> while($row=mysql_fetch_array($result1, MYSQL_ASSOC))
> {
> $id=$row["id"];
> echo "&Id=$id";
> $apellido=$row["apellidoclientesnuevos"];
> echo "&Apellido=$apellido";
>
> $nombre=$row["nombreclientesnuevos"];
> echo "&Nombre=$nombre";
>
> $dni=$row["dniclientesnuevos"];
> echo "&Dni=$dni";
>
> $telefono=$row["telefonoclientesnuevos"];
> echo "&Telefono=$telefono";
>
> $dia=$row["diacitaclientesnuevos"];
> echo "&Dia=$dia";
>
> $mes=$row["mescitaclientesnuevos"];
> echo "&Mes=$mes";
>
> $ano=$row["anocitaclientesnuevos"];
> echo "&Ano=$ano";
>
> $hora=$row["horacitaclientesnuevos"];
> echo "&Hora=$hora";
>
> $minutos=$row["minutoscitaclientesnuevos"];
> echo "&Minutos=$minutos";
>
> $abogado=$row["abogadoclientesnuevos"];
> echo "&Abogado=$abogado";
>
> $asunto=$row["asuntoclientesnuevos"];
> echo "&Asunto=$asunto";
>
> $donde=$row["dondeclientesnuevos"];
> echo "&Donde=$donde";
> }
> ?>
>
> Thanks
> Emilio
>
>
>
>
>
>
> ___
> ¡Llevate a Yahoo! en tu Unifón!
> Ahora podés usar Yahoo! Messenger en tu Unifón, en
> cualquier momento y lugar.
> Encontrá más información en:
> http://ar.mobile.yahoo.com/sms.html
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Correo Yahoo! - 6 MB, tecnología antispam ¡gratis!
 Suscribite ya http://correo.yahoo.com.ar/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] how many databases should I create

2004-10-18 Thread Perry, Matthew (Fire Marshal's Office)
I am developing a variety of different web based systems including
inventory, payroll, incident reports etc.  Should I create a new database
for each project category or one huge database with every table I will ever
use in it?

-Matt



Re: [PHP-DB] how many databases should I create

2004-10-18 Thread Jeffrey Moss
Matter of preference really. Do you put all your files in one directory? I 
do for the most part, but when it comes to security you can divy out access 
to different databases rather than each table and it makes things simpler, 
so I use different databases for different projects. Also, I think you can 
move different databases around onto different partitions if they get too 
big.

-Jeff
- Original Message - 
From: "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 18, 2004 1:37 PM
Subject: [PHP-DB] how many databases should I create


I am developing a variety of different web based systems including
inventory, payroll, incident reports etc.  Should I create a new database
for each project category or one huge database with every table I will 
ever
use in it?

-Matt

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] how many databases should I create

2004-10-18 Thread Norland, Martin
That all really depends on you.  I would certainly say that, in general,
any given database should only have one users table (with a separate
table holding roles, permissions, etc.)  In all likelihood - if all of
these systems will be working together within a single company, and be
built in a common way - you'll likely find it easier to have them all in
one system.

The counter to that, of course, is that information like payroll
certainly shouldn't be easily accessed - so that might be one case where
you might want a separate database.  You'll really just have to weigh
the benefits of having the data together (generally convenience, though
there are reasons along the lines of joins and such) with the costs of
any lost security or lax in responsibility.

- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
From: Perry, Matthew (Fire Marshal's Office)
[mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 2:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] how many databases should I create


I am developing a variety of different web based systems including
inventory, payroll, incident reports etc.  Should I create a new
database for each project category or one huge database with every table
I will ever use in it?

-Matt

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] how many databases should I create

2004-10-18 Thread Antoine
On Mon, 18 Oct 2004 14:53:41 -0500, Norland, Martin
<[EMAIL PROTECTED]> wrote:
> That all really depends on you.  I would certainly say that, in general,
> any given database should only have one users table (with a separate
> table holding roles, permissions, etc.)  In all likelihood - if all of
> these systems will be working together within a single company, and be
> built in a common way - you'll likely find it easier to have them all in
> one system.
> 
> The counter to that, of course, is that information like payroll
> certainly shouldn't be easily accessed - so that might be one case where
> you might want a separate database.  You'll really just have to weigh
> the benefits of having the data together (generally convenience, though
> there are reasons along the lines of joins and such) with the costs of
> any lost security or lax in responsibility.

shouldn't a good rdbms take care of that though (with reasonable
security measures)? can't you get fine grained user privs, at least
with a proper db? postgres?
Cheers
Antoine


-- 
G System, The Evolving GUniverse - http://www.g-system.at

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] how many databases should I create

2004-10-18 Thread Norland, Martin
You're talking two different users here - in my instance, I was talking
application users, not database users.  Yes - realistically - you can
use just the one database and have the user permissions for it, it's
just a case of making sure you track everything right and don't access
the database through the wrong connection - not much different from
making sure you access the right database.

Realistically - a previous comment hits the nail on the head.  All a
different database is, in essence, is a different folder - a different
place where you can store the same stuff.  It's all about how you want
to deal with things, how you visualize them and best interact with them.
Any database should have sufficient user privs to handle these things,
postgresql - mysql - or other.  It's all about who the users who can
actually access the database are, and how the application will need to
map its users to databaes users.

Come to think, however - I don't know that you can assign privledges
per-table in mysql.  So, if your 'user levels' aren't strictly
hierarchical - you probably need to break things up (e.g. if payroll
shouldn't be able to access inventory).


- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
>From: Antoine [mailto:[EMAIL PROTECTED] 
>Sent: Monday, October 18, 2004 4:02 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP-DB] how many databases should I create
..  ..
>shouldn't a good rdbms take care of that though (with reasonable
security measures)? can't you >get fine grained user privs, at least
with a proper db? postgres? Cheers Antoine

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] how many databases should I create

2004-10-18 Thread Graham Cossey
Just to add my 2p/2c..

I use multiple databases as I find this better suits my needs. It is easier
to 'plug-in' various components to a client's application if each component
is contained in an individual database.

For example if your application was to be offered to clients as modules,
then dropping in the relevant database would probably be simpler than
adding/removing tables from one big database.

Also I find it helps me to keep individual client data separate rather than
lump it all together and add extra keys to the tables to differentiate
between clients.

This is of course MY preference for MY application, just airing my
thoughts

Graham

> -Original Message-
> From: Norland, Martin [mailto:[EMAIL PROTECTED]
> Sent: 18 October 2004 22:12
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] how many databases should I create
>
>
> You're talking two different users here - in my instance, I was talking
> application users, not database users.  Yes - realistically - you can
> use just the one database and have the user permissions for it, it's
> just a case of making sure you track everything right and don't access
> the database through the wrong connection - not much different from
> making sure you access the right database.
>
> Realistically - a previous comment hits the nail on the head.  All a
> different database is, in essence, is a different folder - a different
> place where you can store the same stuff.  It's all about how you want
> to deal with things, how you visualize them and best interact with them.
> Any database should have sufficient user privs to handle these things,
> postgresql - mysql - or other.  It's all about who the users who can
> actually access the database are, and how the application will need to
> map its users to databaes users.
>
> Come to think, however - I don't know that you can assign privledges
> per-table in mysql.  So, if your 'user levels' aren't strictly
> hierarchical - you probably need to break things up (e.g. if payroll
> shouldn't be able to access inventory).
>
>
> - Martin Norland, Database / Web Developer, International Outreach x3257
> The opinion(s) contained within this email do not necessarily represent
> those of St. Jude Children's Research Hospital.
>
>
> -Original Message-
> >From: Antoine [mailto:[EMAIL PROTECTED]
> >Sent: Monday, October 18, 2004 4:02 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: [PHP-DB] how many databases should I create
> ..  ..
> >shouldn't a good rdbms take care of that though (with reasonable
> security measures)? can't you >get fine grained user privs, at least
> with a proper db? postgres? Cheers Antoine
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Showing all mysql query results!

2004-10-18 Thread Juan Stiller
Sorry i forgot to change the email address so you
received this message on your personal mail. Sorry for
that!

You re right, i was mistaken, its showing the first
record, and you said im not making php show all, what
modifications should i insert in the code to make it
show all results? But anyway, when i test the file on
my browser, muestradevvars.php it shows all results,
but on flash it only shows the first record.

I just can´t find a proper flash tutorial.



 --- "Norland, Martin" <[EMAIL PROTECTED]>
escribió: 
> No, sorry - I haven't ever had to use flash, let
> alone use it to interface to php.
> 
> Check which result flash is seeing - is it only
> seeing the first, or is it only seeing the last?  It
> looks like you're building a query string to pass to
> it, but you're not presently setting the data as
> arrays (e.g.
> "&Apellido[]={$row['appellidoclientesnuevos']}") -
> which would mean it only gets to see one result set.
> 
> However, you don't want to be passing the entire
> results of your database query in a $_GET string to
> this flash script - if that is what you're doing -
> there is certainly a better/preferred way to get
> this info into flash.
> 
> - Martin Norland, Database / Web Developer,
> International Outreach x3257
> The opinion(s) contained within this email do not
> necessarily represent those of St. Jude Children's
> Research Hospital.
> 
> 
> -Original Message-
> From: Juan Stiller [mailto:[EMAIL PROTECTED]
> 
> Sent: Monday, October 18, 2004 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Showing all mysql query
> results!
> 
> 
> Ok, i just followed your advice for make the code
> easier to read, it looks good, and yes it works ok
> too.
> 
> I´ve tried it, and yes it shows more than 1 entry,
> but
> i cant make flash to show them, im sure something on
> flash must be wrong or missing, there is no fault on
> the php code, so i might research a little more on
> the
> flash part.
> 
> Do you know some good tutorial for this?
> 
> Thanks for your response.
> 
> 
> Juan.
> 
> 
>  --- "Norland, Martin" <[EMAIL PROTECTED]>
> escribió: 
> > 
> > A quick glance says that's all perfectly right, I
> > would run the query on the mysql command line to
> be
> > sure it's really giving more than 1 result - but I
> > can suggest two things:
> > 
> > 1) be sure to mysql_free_result($result)
> afterwards
> > if you're done with the query but your script will
> > still be doing anything. You really do want to do
> > that because it tells mysql you're done with that
> so
> > it can release the memory - PHP doesn't actually
> use
> > the memory for that resultset, it just holds a
> > result id that it uses to get the results from
> mysql
> > (so best to let mysql have its memory back as soon
> > as you're done).
> > 
> > 2) you will save yourself a fair amount of effort
> > and readability, if you don't need those variables
> > other than to print, to change things like so:
> > ---
> > $apellido=$row["apellidoclientesnuevos"];
> > echo "&Apellido=$apellido";
> > --- becomes ---
> > echo
> "&Apellido={$row['appellidoclientesnuevos']}";
> > ---
> > (you don't need to use ', " works too - I find '
> > more legible here)
> > 
> > This may also reduce confusion if you start
> thinking
> > that the database field is holding just names,
> > instead of names of new clients (e.g. you
> > accidentally paste it elsewhere for use and keep
> > pulling only from the new clients table).
> > 
> > Are you perhaps storing clients in that table
> > temporarily, so it rarely has many clients in it?
> > That could explain the behaviour as well.
> > 
> > - Martin Norland, Database / Web Developer,
> > International Outreach x3257
> > The opinion(s) contained within this email do not
> > necessarily represent those of St. Jude Children's
> > Research Hospital.
> > 
> > 
> > -Original Message-
> > From: Juan Stiller
> [mailto:[EMAIL PROTECTED]
> > 
> > Sent: Monday, October 18, 2004 11:07 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] Showing all mysql query results!
> > 
> > 
> > Hi, im using this script, to show all entrys of a
> > mysql database on a flash movieclip, but i was
> told
> > at
> > flash forums, that this code is not ok, because
> its
> > showing only the last entry not all of them, maybe
> > you
> > someone can recommend what to add to this little
> > script?.
> > 
> > 
> >  > $conn = @mysql_connect("***", "***", "");
> > 
> > if (!$conn) {
> > echo( "No se pudo conectar " .
> > "al servidor MySQL." );
> > exit();
> > }
> > 
> > if (! @mysql_select_db("clientes") ) {
> > echo( "No se puede encontrar " .
> > "la base de datos clientes!" );
> > exit();
> > }
> > 
> > // Request all data
> > $result1 = mysql_query("select * from
> > clientesnuevos");
> > 
> > print "Results=";
> > echo "Clientes agregados:";
> > 
> > while($row=mysql_fetch_array($result1,
> MYSQL_ASSOC))
> > {
> > $id=$row["id"];
> > echo "&Id=$id";
> > $apellido=$row["apellidocl

Re: [PHP-DB] how many databases should I create

2004-10-18 Thread M Saleh EG
You can assign tables to users with MySQL server ! 

It's all just the matter of how you design your application and the
level of confidenciality and security you want to have and how your
application is going to deal with it. Or in other words, your ACL
system structure and algorithms.


On Mon, 18 Oct 2004 23:13:53 +0100, Graham Cossey
<[EMAIL PROTECTED]> wrote:
> Just to add my 2p/2c..
> 
> I use multiple databases as I find this better suits my needs. It is easier
> to 'plug-in' various components to a client's application if each component
> is contained in an individual database.
> 
> For example if your application was to be offered to clients as modules,
> then dropping in the relevant database would probably be simpler than
> adding/removing tables from one big database.
> 
> Also I find it helps me to keep individual client data separate rather than
> lump it all together and add extra keys to the tables to differentiate
> between clients.
> 
> This is of course MY preference for MY application, just airing my
> thoughts
> 
> Graham
> 
> 
> 
> > -Original Message-
> > From: Norland, Martin [mailto:[EMAIL PROTECTED]
> > Sent: 18 October 2004 22:12
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP-DB] how many databases should I create
> >
> >
> > You're talking two different users here - in my instance, I was talking
> > application users, not database users.  Yes - realistically - you can
> > use just the one database and have the user permissions for it, it's
> > just a case of making sure you track everything right and don't access
> > the database through the wrong connection - not much different from
> > making sure you access the right database.
> >
> > Realistically - a previous comment hits the nail on the head.  All a
> > different database is, in essence, is a different folder - a different
> > place where you can store the same stuff.  It's all about how you want
> > to deal with things, how you visualize them and best interact with them.
> > Any database should have sufficient user privs to handle these things,
> > postgresql - mysql - or other.  It's all about who the users who can
> > actually access the database are, and how the application will need to
> > map its users to databaes users.
> >
> > Come to think, however - I don't know that you can assign privledges
> > per-table in mysql.  So, if your 'user levels' aren't strictly
> > hierarchical - you probably need to break things up (e.g. if payroll
> > shouldn't be able to access inventory).
> >
> >
> > - Martin Norland, Database / Web Developer, International Outreach x3257
> > The opinion(s) contained within this email do not necessarily represent
> > those of St. Jude Children's Research Hospital.
> >
> >
> > -Original Message-
> > >From: Antoine [mailto:[EMAIL PROTECTED]
> > >Sent: Monday, October 18, 2004 4:02 PM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: [PHP-DB] how many databases should I create
> > ..  ..
> > >shouldn't a good rdbms take care of that though (with reasonable
> > security measures)? can't you >get fine grained user privs, at least
> > with a proper db? postgres? Cheers Antoine
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
M.Saleh.E.G
97150-4779817

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Books

2004-10-18 Thread balwantsingh
I found PHP and MySQL for Dynamic Web Sites (by Larry Ullman) very useful
and quick guide as it gives many example also.  i learned PHP from this book
only.

another book (which i have not yet seen but many people have recommended me)
is PHP BLACK BOOK by peter moulding.

Also friend, pls. do one favour for me, after finalsing the book may pls.
also inform me the name for my reference.

with best wishes
balwant

-Original Message-
From: Huy Ton That [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 10:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Books


Can anyone recommend me any good books that they return to for both
information learning PHP & maybe MySQL and/or reference?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php