php-general Digest 22 Apr 2010 12:33:17 -0000 Issue 6706

Topics (messages 304393 through 304409):

Re: Hello everybody - php newbie from switzerland
        304393 by: Dan Joseph
        304395 by: David McGlone
        304396 by: Dan Joseph
        304398 by: Per Jessen

Re: CD, DVD, and Blu-Ray (Not PHP)
        304394 by: Tommy Pham
        304403 by: Ashley Sheridan

Re: [RCD] [RCU] I try to implement the change password plugin { cross post 
volontary of rondcube list }
        304397 by: fakessh

Re: Want a answer about php-cgi
        304399 by: Sharl.Jimh.Tsin
        304401 by: Lupus Michaelis
        304402 by: Sharl.Jimh.Tsin

Re: replying to list (I give up)
        304400 by: O. Lavell
        304407 by: Ashley Sheridan
        304409 by: David McGlone

Re: replying to list
        304404 by: Ashley Sheridan

Re: Getting Array to Display
        304405 by: Ashley Sheridan
        304406 by: Ashley Sheridan

Re: replying to list (I give up)[SOLVED TO A DEGREE]
        304408 by: Ashley Sheridan

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Wed, Apr 21, 2010 at 8:09 PM, David McGlone <da...@dmcentral.net> wrote:

> On Wed, 2010-04-21 at 18:21 -0400, Brandon Rampersad wrote:
> > What's wrong with asking if PHP supports threading?
>
> Nothing really, I was just kidding.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
lol..  I didn't see your email where you said not to ask

-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code "NEWTHINGS" for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry

--- End Message ---
--- Begin Message ---
On Wed, 2010-04-21 at 20:12 -0400, Dan Joseph wrote:
> On Wed, Apr 21, 2010 at 8:09 PM, David McGlone <da...@dmcentral.net> wrote:
> 
> > On Wed, 2010-04-21 at 18:21 -0400, Brandon Rampersad wrote:
> > > What's wrong with asking if PHP supports threading?
> >
> > Nothing really, I was just kidding.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> lol..  I didn't see your email where you said not to ask
> 

Are we gonna have to have a discussion on the use of "threading"? LOL


--- End Message ---
--- Begin Message ---
On Wed, Apr 21, 2010 at 8:38 PM, David McGlone <da...@dmcentral.net> wrote:

>
> Are we gonna have to have a discussion on the use of "threading"? LOL
>
>
>
We just might.  Personally, I use it to sow holes in the toe of my socks.

-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code "NEWTHINGS" for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry

--- End Message ---
--- Begin Message ---
Dan Joseph wrote:

> On Wed, Apr 21, 2010 at 8:38 PM, David McGlone <da...@dmcentral.net>
> wrote:
> 
>>
>> Are we gonna have to have a discussion on the use of "threading"? LOL
>>
>>
>>
> We just might.  Personally, I use it to sow holes in the toe of my
> socks.
> 

My newsreader supports threading. 


-- 
Per Jessen, Zürich (7.4°C)


--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Dan Joseph [mailto:dmjos...@gmail.com]
> Sent: Wednesday, April 21, 2010 10:19 AM
> To: PHP
> Subject: Re: [PHP] CD, DVD, and Blu-Ray (Not PHP)
> 
> On Wed, Apr 21, 2010 at 1:16 PM, tedd <t...@sperling.com> wrote:
> 
> > I'm no expert on media, but the only difference between CD, DVD, Blu-
> Ray is
> > the amount of data they can hold, right? IOW, you can still record
> video,
> > audio, pictures, files, all digital data on all media - it's just
> that
> > Blu-Ray can hold more than DVD and DVD holds more than CD, isn't that
> right?
> >
> >
> Speaking purely data, yessir.  That's your difference.
> 
> --
> -Dan Joseph
> 
> www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.
> Promo
> Code "NEWTHINGS" for 10% off initial order
> 
> http://www.facebook.com/canishosting
> http://www.facebook.com/originalpoetry

More data brings the ultimate experience of HD 3D in both video and audio.


--- End Message ---
--- Begin Message ---
On Wed, 2010-04-21 at 13:16 -0400, tedd wrote:

> Hi gang:
> 
> I'm no expert on media, but the only difference between CD, DVD, 
> Blu-Ray is the amount of data they can hold, right? IOW, you can 
> still record video, audio, pictures, files, all digital data on all 
> media - it's just that Blu-Ray can hold more than DVD and DVD holds 
> more than CD, isn't that right?
> 
> Cheers,
> 
> tedd
> 
> 
> -- 
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 


I believe they each have certain formats as well, i.e. the way that data
is stored on them. So data stored on a DVD would be laid out in a
different filesystem to a CD with the same data.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
hello boys and girls
hello all users of this list
hello guru of php
hello much many people

here is my previous discution

Hi there,
You don't really need to write any line in C to change the password the
PAM way:

http://svn.php.net/viewvc/pecl/pam/trunk/README?view=markup

This is a PECL module, so installation is easy: pecl install pam

See you!!
emi

2010/4/20 fakessh <fake...@fakessh.eu>:

    On Tue, 20 Apr 2010 14:09:07 +0200, "A.L.E.C" <a...@alec.pl> wrote:

        fakessh wrote:

            I try to implement the change password plugin I just watched
http://trac.roundcube.net/browser/trunk/plugins/password it does not seem
to have an option to change password when using 

    dovecot

            I do not use sql or ldap. I use pam to store my password
through the authentication to postfix and dovecot: my passwords are login
or plain text if so, can you enlighten me how to use the change password
plugin 

        I don't know if there is a plugin or driver for PAM passwords
change. You need a command line tool for changing passwords e.g. chpasswd
and use it in PHP. For example see 'sasl' driver from 'password' plugin.
Programmers can take a look at http://www.unicom.com/sw/web-chpass. Also 

        virtualmin (which we support in virtualmin driver) probably is
working with PAM. 

    thank you A.L.E.C thanks you all users I just look at the code
http://trac.roundcube.net/browser/trunk/plugins/password/drivers/sasl.php
to integrate easily into roundcube it is simply necessary to modify the
code web-chpass and the executable c nipasswd then plugin with a part in c
I'm afraid of writing this piece of c, I just perl the c is entirely taken
from http://www.unicom.com/sw/web-chpass I am afraid to make mistakes in
writing c them what someone feels able to write this plugin derives from
nipasswd _______________________________________________ List info:
http://lists.roundcube.net/dev/ 


i just perl and c
I do not know php
I want a little help to understand and run the documentation
I correctly installed pecl install pam

I have the following API

1       API
2       
3       bool pam_auth(string $username, string $password [, string &$error [
$checkacctmgmt = true ] ])
4       bool pam_chpass(string $username, string $oldpassword, string
$newpassword [, string &$error ])
5       
6       The parameters are
7       
8       username - Username to check
9       password - User supplied password
10      error - Output parameter to put any error messages in
11      checkacctmgmt - Call pam_acct_mgmt() to check account expiration and
access hours (requires root access!)
12      oldpassword - Current password on account
13      newpassword - Password to change to 



can you give me a simple example using this API

bool           pam_auth        (string $username,    string $password     
[, string &$error      [ $checkacctmgmt = true ] ])
^              ^                ^                     ^                   
 ^                      ^
what it 's     what it 's       what it 's            what it 's          
what it 's             what it 's


bool           pam_chpass        (string $username,    string
$oldpassword,     string $newpassword     [, string &$error ])
^              ^                ^                       ^                 
    ^                       ^
what it 's     what it 's       what it 's              what it 's        
    what it 's              what it 's



can you give me a simple example of how these functions
A simple example would allow me to easily write the plugin for
roundcubemail


thanks for your advice
thanks for all return


aka /fakessh/


--- End Message ---
--- Begin Message ---
who can give me a sample to build a cgi version of php 5.3.x?

i really have no idea now...

Best regards,
Sharl.Jimh.Tsin



在 2010年4月21日 下午7:32,Sharl.Jimh.Tsin <amoiz.sh...@gmail.com> 写道:
> added it,but still no found. 囧rz
>
> Best regards,
> Sharl.Jimh.Tsin
>
>
>
> 2010/4/21 Sharl.Jimh.Tsin <amoiz.sh...@gmail.com>:
>> Sorry,i don't add it.
>>
>> and i can not find them in the ./configure --help context.
>>
>> does this string really exist?
>>
>> thankx a lot.
>>
>> Best regards,
>> Sharl.Jimh.Tsin
>>
>>
>>
>> 2010/4/21 shiplu <shiplu....@gmail.com>:
>>> Did you try   --with-fastcgi or --enable-fastcgi
>>>
>>>
>>>
>>>
>>>
>>> Shiplu Mokaddim
>>> My talks, http://talk.cmyweb.net
>>> Follow me, http://twitter.com/shiplu
>>> SUST Programmers, http://groups.google.com/group/p2psust
>>> Innovation distinguishes bet ... ... (ask Steve Jobs the rest)
>>>
>>>
>>>
>>> On Wed, Apr 21, 2010 at 5:17 PM, Sharl.Jimh.Tsin <amoiz.sh...@gmail.com> 
>>> wrote:
>>>> i can not find php-cgi file in the bin/sbin directory. WHY?
>>>
>>
>

--- End Message ---
--- Begin Message ---
Le 21/04/2010 12:17, Sharl.Jimh.Tsin a écrit :

i can not find php-cgi file in the bin/sbin directory. WHY?
("--disable-cgi" is not used)

  cd to your build directory, then type next command :

  find . -name php5-cgi -or -name php-cgi


--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

--- End Message ---
--- Begin Message ---
thanks for your reply.

i think i have know the reason now.

the CGI version of php is not built by default,we MUST add
"--enable-cgi" to configure explicitly.

Best regards,
Sharl.Jimh.Tsin



2010/4/22 Lupus Michaelis <mickael+...@lupusmic.org>:
> Le 21/04/2010 12:17, Sharl.Jimh.Tsin a écrit :
>
>> i can not find php-cgi file in the bin/sbin directory. WHY?
>> ("--disable-cgi" is not used)
>
>  cd to your build directory, then type next command :
>
>  find . -name php5-cgi -or -name php-cgi
>
>
> --
> Mickaël Wolff aka Lupus Michaelis
> http://lupusmic.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Michelle Konzack wrote:
> Hello David McGlone,
> 
> Am 2010-04-21 08:27:18, hacktest Du folgendes herunter:
>> I give up. trying to reply to messages on this list is tedious. I can't
>> pinpoint whether it's because the list is set up to make replies go to
>> the OP or the OP has his reply-to in his mail client set, or most
>> people are hitting the reply-to button instead of simply reply.
> 
> You are using Evolution and I am wondering, why you do not use the
> "List-Reply Button"!

There is no such button in the Evolution version I am using, but Ctrl+L 
works just as well.

I prefer to read this list as an nntp newsgroup on news.php.net.


--- End Message ---
--- Begin Message ---
On Wed, 2010-04-21 at 19:55 +0000, Bobby Pejman wrote:

> I must say, I never heard or even thought of the idea of calling it LookOut. 
> Hahaha.  It made me laugh for a good 10 minutes and if that term is open 
> source, I will be using it ;)
> 
> -----Original Message-----
> From: "Bob McConnell" <r...@cbord.com>
> Date: Wed, 21 Apr 2010 15:01:55 
> To: Michelle Konzack<linux4miche...@tamay-dogan.net>; 
> <php-gene...@lists.php.net>
> Subject: RE: [PHP] Re: replying to list (I give up)
> From: Michelle Konzack
> 
> > Hello Peter Lind,
> > 
> > Am 2010-04-21 15:47:54, hacktest Du folgendes herunter:
> >> And waste time every single time you post to the list ... why do
> >> people become programmers/developers again? To end creating technical
> >> solutions they can then avoid using by doing extra, pointless manual
> >> work?
> > 
> > Hmmm, being a Programmer/Developer since 1982 and have ever used
> decent
> > tools to accomplish a task...  including the right  MUA  which
> simplify
> > the Programmers/Developers daily mailing tasks.
> > 
> >> Anyway, if there's no chance of changing the minds of the people
> >> administering the list, the discussion might as well end now.
> > 
> > Why should Programmers/Developers bother with non-reliable  MUAs
> which
> > do not support Programmers/Developers daily mailing tasks?
> > 
> > If YOU are a Programmer/Developer why do you bother with a
> non-suitable
> > MUA?
> 
> Probably because we don't have a choice. There is a legion of PHBs that
> make those decisions for us, obviously without having any information
> about what tools are really needed. I have to hand edit every response I
> send here and to several other lists in order to add the quote markers
> and move my content to the correct location. Lookout no longer offers
> that option. It also lacks the reply-to-list action as well as several
> others that would make life easier and simpler for everyone. I can't
> replace it because it is closely bound to our Exchange servers for
> scheduling and planning. So I won't have an option until after I retire,
> and then I won't need this list at all. Fortunately, that is only a
> couple of years away at most.
> 
> Bob McConnell
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


Outlook is a pita sometimes. At my last job I just used Evolution and
connected over the OWA, as at the time I had to use my own laptop
because of a lack of computers available.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Wednesday 21 April 2010 12:16:28 O. Lavell wrote:
> Michelle Konzack wrote:
> > Hello David McGlone,
> >
> > Am 2010-04-21 08:27:18, hacktest Du folgendes herunter:
> >> I give up. trying to reply to messages on this list is tedious. I can't
> >> pinpoint whether it's because the list is set up to make replies go to
> >> the OP or the OP has his reply-to in his mail client set, or most
> >> people are hitting the reply-to button instead of simply reply.
> >
> > You are using Evolution and I am wondering, why you do not use the
> > "List-Reply Button"!
> 
> There is no such button in the Evolution version I am using, but Ctrl+L
> works just as well.
> 
> I prefer to read this list as an nntp newsgroup on news.php.net.
> 

I switched to Kontact where I am able to add a "reply to list" button on the 
tool bar.

I put it right beside the "reply" so when I go to hit the "reply" It will 
remind me of which one I actually need to hit.

I'm trying to make my computer work for me so I can focus on PHP, not the 
other way around. So after 16 years, I'm done tinkering with my OS's. It gets 
old and writing scripts for every little thing that I think will make my life 
easier is just a thing of the past for me.

Now-a-days the only tinkering I have to do is adding my samba shares to fstab 
when I do fresh installs, and installing apps I use that aren't included by 
default.

Simple, quick and to the point. Thats all I care about anymore.

-- 
Blessings,
David M.

--- End Message ---
--- Begin Message ---
On Wed, 2010-04-21 at 19:15 +0200, Michelle Konzack wrote:

> Can you not adapt the toolbar?


I did find
http://www.mail-archive.com/evolut...@lists.ximian.com/msg01302.html but
it looks to be Linux-only. I would assume there's an equivalent method
out there for Windows and Macs.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Wed, 2010-04-21 at 14:18 -0400, Gary wrote:

> As an addition to the issue, when I do a SELECT FROM and call for a specific 
> keyword, it does not return any records..
> 
> 
> Gary
> 
> 
> ""Gary"" <gwp...@ptd.net> wrote in message 
> news:70.50.63467.0020f...@pb1.pair.com...
> >I have a form that I have a (ever growing) list of checkboxes,  Here is a
> > sample of  the code for it.
> >
> > <input name="keyword[]" type="checkbox" value="fox" />
> >
> > It seems to go in, when I say seems to, I get a result of Array in the
> > table, the code is listed below.  I have tried various solutions I found 
> > in
> > searching the issue, but have only been able to so far get Array.
> >
> >  echo '<table border="1"><th>Id Number</th><th>Date
> > Entered</th><th>Caption</th><th>Where
> > Taken</th><th>Keywords</th><th>Description</th><th>Image</th>';
> >  while ($row = mysqli_fetch_array($data)) {
> >
> >    echo '<tr><td>' . $row['image_id']. '</td>';
> >   echo '<td>' . $row['submitted']. '</td>';
> >    echo '<td>' . $row['caption']. '</td>';
> >    echo '<td>' . $row['where_taken'] . '</td>';
> >    echo '<td>' . $row['keyword']. '</td>';
> >       echo '<td>' . $row['description'] . '</td>';
> >      if (is_file($row['image_file'])) {
> >      echo '<td><img src="'.$row['image_file'].'" width="100px"
> > height="100px"/></td>';
> >      }
> >
> > As a bonus question, does anyone have any idea why the image would show up
> > in IE8, and not FF?
> >
> > Thanks for your help.
> >
> > Gary
> >
> >
> >
> > __________ Information from ESET Smart Security, version of virus 
> > signature database 5047 (20100421) __________
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> >
> >
> >
> > __________ Information from ESET NOD32 Antivirus, version of virus 
> > signature database 5048 (20100421) __________
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> >
> > 
> 
> 
> __________ Information from ESET NOD32 Antivirus, version of virus signature 
> database 5048 (20100421) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 
> 
> 
> 


That's because you havn't stored any keywords in the DB! You've stored
the word 'Array'. Have you actually looked at the data with phpMyAdmin
at all?

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Wed, 2010-04-21 at 14:31 -0400, Gary wrote:

> Ashley
> 
> If I were to create a child table, would the Type be a Bool?
> 
> Gary
> 
> 
> "Ashley Sheridan" <a...@ashleysheridan.co.uk> wrote in message 
> news:1271862971.20937.19.ca...@localhost...
> > On Wed, 2010-04-21 at 11:01 -0400, Gary wrote:
> >
> >> Ashley
> >>
> >> Thank you for your reply.
> >>
> >> I was trying to get the structure of the DB into a text form, cant seem 
> >> to
> >> find that (phpmyadmin).
> >>
> >> This is the insert code
> >>
> >> <?php
> >> $caption=($_POST['caption']);
> >> $keyword=($_POST['keyword']);
> >> $description=($_POST['description']);
> >> $image_file=($_POST['image_file']);
> >> $where_taken=($_POST['where_taken']);
> >>
> >> $dbc=mysqli_connect('', '', '', 'images');
> >>
> >> $query="INSERT INTO images(caption, where_taken, keyword, description,
> >> image_file) VALUES
> >> ('$caption','$where_taken','$keyword','$description','$image_file')";
> >>  if (isset($_POST['submit'])) {
> >>
> >>      $how_many = count($keyword);
> >>      echo 'keywords chosen: '.$how_many.'<br />';
> >>      if ($how_many>0) {
> >>          echo 'You chose the following keywords:<br />';
> >>      }
> >>      for ($i=0; $i<$how_many; $i++) {
> >>      echo ($i+1) . '- ' . $keyword[$i] . '<br />';
> >>    }
> >>       echo "<br />";
> >>  }
> >> $result = mysqli_query($dbc, $query)
> >> or die('Error querying database.');
> >>
> >> if($result == true) {
> >>        echo "Successfully Inserted $image_file into database";
> >>    } else {
> >>        echo "Some Error Occured While Inserting Records";
> >>    }
> >>
> >> mysqli_close($dbc);
> >> ?>
> >>
> >> I hope that helps, and again thank you for your reply.
> >>
> >> gary
> >>
> >>
> >> "Ashley Sheridan" <a...@ashleysheridan.co.uk> wrote in message
> >> news:1271858245.20937.10.ca...@localhost...
> >> > On Wed, 2010-04-21 at 09:47 -0400, Gary wrote:
> >> >
> >> >> I have a form that I have a (ever growing) list of checkboxes,  Here 
> >> >> is a
> >> >> sample of  the code for it.
> >> >>
> >> >>  <input name="keyword[]" type="checkbox" value="fox" />
> >> >>
> >> >> It seems to go in, when I say seems to, I get a result of Array in the
> >> >> table, the code is listed below.  I have tried various solutions I 
> >> >> found
> >> >> in
> >> >> searching the issue, but have only been able to so far get Array.
> >> >>
> >> >>   echo '<table border="1"><th>Id Number</th><th>Date
> >> >> Entered</th><th>Caption</th><th>Where
> >> >> Taken</th><th>Keywords</th><th>Description</th><th>Image</th>';
> >> >>   while ($row = mysqli_fetch_array($data)) {
> >> >>
> >> >>     echo '<tr><td>' . $row['image_id']. '</td>';
> >> >>    echo '<td>' . $row['submitted']. '</td>';
> >> >>     echo '<td>' . $row['caption']. '</td>';
> >> >>     echo '<td>' . $row['where_taken'] . '</td>';
> >> >>     echo '<td>' . $row['keyword']. '</td>';
> >> >>        echo '<td>' . $row['description'] . '</td>';
> >> >>       if (is_file($row['image_file'])) {
> >> >>       echo '<td><img src="'.$row['image_file'].'" width="100px"
> >> >> height="100px"/></td>';
> >> >>       }
> >> >>
> >> >> As a bonus question, does anyone have any idea why the image would 
> >> >> show
> >> >> up
> >> >> in IE8, and not FF?
> >> >>
> >> >> Thanks for your help.
> >> >>
> >> >> Gary
> >> >>
> >> >>
> >> >>
> >> >> __________ Information from ESET Smart Security, version of virus
> >> >> signature database 5047 (20100421) __________
> >> >>
> >> >> The message was checked by ESET Smart Security.
> >> >>
> >> >> http://www.eset.com
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> > You say you're getting an entry of Array in your table. Is this after
> >> > performing an insert query from the form? If so, we're gonna need to 
> >> > see
> >> > the code for that! If it's that you're retrieving from the DB and
> >> > getting Array as the output, then it could be that you're using string
> >> > functions on an array. However, as you said images are displaying, I
> >> > don't think that's the case. Maybe some of the fields in the DB have a
> >> > string literal of 'Array' as their value?
> >> >
> >> > As for the images not displaying correctly, have you tried to just open
> >> > those images up in a browser using their uri? Just copy and paste it
> >> > from the <img> tag. It might give more input on exactly what is
> >> > happening with the image.
> >> >
> >> > Thanks,
> >> > Ash
> >> > http://www.ashleysheridan.co.uk
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > __________ Information from ESET NOD32 Antivirus, version of virus
> >> > signature database 5047 (20100421) __________
> >> >
> >> > The message was checked by ESET NOD32 Antivirus.
> >> >
> >> > http://www.eset.com
> >> >
> >> >
> >>
> >>
> >> __________ Information from ESET NOD32 Antivirus, version of virus 
> >> signature database 5047 (20100421) __________
> >>
> >> The message was checked by ESET NOD32 Antivirus.
> >>
> >> http://www.eset.com
> >>
> >>
> >>
> >>
> >
> >
> > You're inserting the string 'Array' into the DB. The form you have is
> > sending an actual array, but the insert statement can only insert a
> > single string. The string of the array is, as you've found out, 'Array'.
> >
> > Consider normalising the DB and having a keywords table with 3 fields:
> > id, image_id, keyword.
> >
> > Then each entry in the keywords table would be a keyword, linked by
> > image_id. You'll also need to change your images table to include an id
> > by which you can reference each image individually and index by.
> >
> > Lastly, be very careful of your insert statements. The way things stand,
> > it would be easy for someone to maliciously enter their own statements.
> > Use something like mysql_real_escape_string() to protect against MySQL
> > attacks.
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> >
> >
> > __________ Information from ESET NOD32 Antivirus, version of virus 
> > signature database 5047 (20100421) __________
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> > 
> 
> 
> __________ Information from ESET NOD32 Antivirus, version of virus signature 
> database 5048 (20100421) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 
> 
> 
> 


The table won't have a type, it will just be another regular table.

The second table has 3 fields, id, image_id, keyword. The image_id field
will match up against the image_id row in the first table, so you can
have multiple rows in the keywords table that match up to just one row
in the images table. This is called a one-to-many relationship.

Then, you would do a typical SQL join to retrieve the data:

SELECT images.image_id, images.submitted, images.caption,
images.where_taken, images.description, images.file, keywords.keyword
FROM images
LEFT JOIN keywords ON (keywords.image_id = images.image_id)
WHERE images.image_id = x

and change x to whatever identifier you are using. This will retrieve a
bunch of rows for the keywords for each image.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Wed, 2010-04-21 at 15:55 -0500, Karl DeSaulniers wrote:

> On Apr 21, 2010, at 1:51 PM, Jay Blanchard wrote:
> 
> > Then write an interface (using PHP of course) that
> > only responds to the list when you generate a reply.
> 
> LOL
> WT??
> 
> WHY would we want to do that? Much unnecessary work when an admin  
> could set a reply-to and all would be solved.
> With all due respect, if I was going to go through all that trouble  
> just so I could hit reply instead of reply-all or reply-list or reply- 
> group,
> I would write an email list program that discussed PHP (in PHP) and I  
> would set the reply-to to go to my list email.
> :)
> 
> Not to mention, the admin can set all of them to go to the list email.
> 
> reply-to
> reply-list
> reply-group
> 
> They just have to set the headers to point there. Much easier than  
> what was suggested.
> 
> That aside, I think David was just wondering why it was set up that  
> way in the first part.
> More a question for a admin, then the list, but it is on the list  
> none the less.
> I would have sent that one to the Admin directly.
> 
> It is curious though, why the admin of the PHP lists depend on  
> special case scenarios such as reply-list or reply-group.
> To me, thats kind of like saying you can only click buttons on our  
> website if you use Internet Explorer.
> Everyone else has to view the source and copy the urls to navigate.
> 
> Best,
> 
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
> 
> 


I believe Dan Brown mentioned a very good reason why this is not as
simple an issue as just changing the reply-to. Not everyone who posts to
the list subscribes to the list, so being copied into the emails is good
for them. Suddenly changing the way things work could actually be
detrimental to the list. Imagine how many people joined up *after*
posting a question and receiving a good answer.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---

Reply via email to