php-general Digest 13 May 2013 09:43:44 -0000 Issue 8229

Topics (messages 321076 through 321077):

Re: Sync CSV files with MySQL Database.
        321076 by: tamouse mailing lists

Re: undef func - any more clues ?
        321077 by: georg

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 Sat, May 11, 2013 at 9:41 AM, Jim Giner <jim.gi...@albanyhandball.com> wrote:
> On 5/11/2013 12:57 AM, Carlos Sura wrote:
>>
>> Hello mates,
>>
>> Perhaps this seems to be a silly question, but it is not to me, here is
>> the
>> scenario:
>>
>> I know how to import CSV files with PHP to a MySQL database, the thing is,
>> that CSV file is automatically feed by a third-party application, I want
>> to
>> do something to add just the new records, not all the records again.
>>
>> Any idea or example, will be really appreciated.
>>
>> Thanks!
>>
> So - just how are you doing your import now?  If you are breaking down the
> csv "record" into fields before adding it to the db, then it would be simple
> to take the 'key' fields and check your database before adding each record,
> no?

While not strictly a PHP operation, you can compare two files and just
get the new lines in the second file using the comm(1) command in
shell:

$ comm -1 -3 file1 file2

will simply emit the lines in file2 that are not in file1

If you keep around the last file loaded, and compare it using the
above command with the newest file, you'll just have the new records
to import. Then keep the newest file to compare with the next newest
one.

If you want to keep things all pure PHP, you could easily come up with
a similar operation in PHP.

--- End Message ---
--- Begin Message ---
Hi David, and all who helped,

for now one step forward  my text message "db open" hit the screen.

after som brain-melting of various inputs i ad hoc came to the quite obvious 
conclusion,
try yum with what yum could be wanting:

** yum install php-odbc **

and see that magic, without knowledge of what Im really doing I got through

tnx 
/georg
  ----- Original Message ----- 
  From: georg 
  To: David OBrien 
  Sent: Sunday, May 12, 2013 9:00 PM
  Subject: Re: [PHP] undef func - any more clues ?


  found this that might be right (64  what does that stand for, i have to my 
knowledge a 32bit machine)

  how would I go about to install this ? 

  tnx
  Goerg
    ----- Original Message ----- 
    From: David OBrien 
    To: georg 
    Sent: Sunday, May 12, 2013 7:54 PM
    Subject: Re: [PHP] undef func - any more clues ?



    On May 12, 2013 1:35 PM, "georg" <georg.chamb...@telia.com> wrote:
    >
    > Hi
    > Im not really following, I have done:
    > pecl list-all ; but dont find anything that has to do with ODBC
    >
    > so still stuck with Apache error log saying : no such function (or eqiv 
speak) odbc_connect()
    > tnx
    > Georg
    >
    > ----- Original Message ----- From: "Ashley Sheridan" 
<a...@ashleysheridan.co.uk>
    > To: "georg" <georg.chamb...@telia.com>
    > Cc: "James Yerge" <ja...@nixsecurity.org>; "PHP General" 
<php-gene...@lists.php.net>
    > Sent: Saturday, May 11, 2013 12:05 PM
    > Subject: Re: [PHP] undef func - any more clues ?
    >
    >
    >
    >> On Sat, 2013-05-11 at 11:36 +0200, georg wrote:
    >>
    >>> Hi again,
    >>> is there any more clues to how Apache/PHP would get hold of ODBC 
libraries ?
    >>>
    >>>
    >>> (( summery; Im a bit new to linux (here Fedora 17) so Im not sure of how
    >>> these entities get hold of each other; are they linked into same module 
or
    >>> are they dynamically loaded
    >>> libraries, guess that the latter. Then Im not clear over the "path" or
    >>> "linkage" of these; that is where
    >>> are the definitions made to link them together; there is a series of 
conf
    >>> and ini files (and keyword) which should
    >>> link names, and point to file names in (defined ?) directories (given by
    >>> paths)    ))
    >>>
    >>> / Georg
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> ----- Original Message ----- From: "georg" <georg.chamb...@telia.com>
    >>> To: "James Yerge" <ja...@nixsecurity.org>
    >>> Cc: "PHP General" <php-gene...@lists.php.net>
    >>> Sent: Saturday, May 11, 2013 12:47 AM
    >>> Subject: Re: [PHP] undef func
    >>>
    >>>
    >>> > Ok, txn ! so
    >>> > yum install php-devel
    >>> >
    >>> > worked, and got me a hole lot of pearl, however, still PHP has
    >>> > odbc_connect() call as undefined function. as per Apache error log.
    >>> >
    >>> > There was some mentioning of php.ini; could that be something here ?
    >>> >
    >>> > /georg
    >>> >
    >>> > ----- Original Message ----- > From: "James Yerge" 
<ja...@nixsecurity.org>
    >>> > To: "Gabriel Ricci" <gabrielri...@gmail.com>
    >>> > Cc: "georg" <georg.chamb...@telia.com>; "Serge Fonville"
    >>> > <serge.fonvi...@gmail.com>; "Daniel Brown" <danbr...@php.net>; 
"tamouse
    >>> > mailing lists" <tamouse.li...@gmail.com>; "PHP General"
    >>> > <php-gene...@lists.php.net>
    >>> > Sent: Saturday, May 11, 2013 12:12 AM
    >>> > Subject: Re: [PHP] undef func
    >>> >
    >>> >
    >>> >> On 05/10/2013 06:08 PM, Gabriel Ricci wrote:
    >>> >>> pear isntall php-dev
    >>> >>>
    >>> >>>
    >>> >>> Att.
    >>> >>>
    >>> >>> Gabriel Ricci
    >>> >>> ____________________
    >>> >>>
    >>> >>> Website <http://gabrielricci.github.com>
    >>> >>> Follow @gabrielricci <http://www.twitter.com/gabrielricci>
    >>> >>> Facebook profile <http://www.facebook.com/gabrielricci2>, GitHub
    >>> >>> profile<http://www.github.com/gabrielricci/>
    >>> >>> <http://code.google.com/p/syslibjs/>
    >>> >>>
    >>> >>>
    >>> >>> On Fri, May 10, 2013 at 7:07 PM, georg <georg.chamb...@telia.com> 
>>> wrote:
    >>> >>>
    >>> >>>> **
    >>> >>>> So thanx again, closing in. It turned out that I had tried; yum 
>>>> install
    >>> >>>> php_pear  // i.e. with an underscore, should be with hyphen !
    >>> >>>> so crawling a mm forward; then stuck on; pecl install pdo_odbc    
// >>>> in
    >>> >>>> this case the undrscore is ok (!)
    >>> >>>> which fails as
    >>> >>>>
    >>> >>>> "Cant find php headers in /usr/include/php"  followed by "Error 
>>>> phpize
    >>> >>>> failed"
    >>> >>>>
    >>> >>>> /georg
    >>> >>>>
    >>> >>>> ----- Original Message -----
    >>> >>>> *From:* Serge Fonville <serge.fonvi...@gmail.com>
    >>> >>>> *To:* georg <georg.chamb...@telia.com>
    >>> >>>> *Cc:* Gabriel Ricci <gabrielri...@gmail.com> ; Daniel
    >>> >>>> Brown<danbr...@php.net>; tamouse
    >>> >>>> mailing lists <tamouse.li...@gmail.com> ; PHP
    >>> >>>> General<php-gene...@lists.php.net>
    >>> >>>> *Sent:* Friday, May 10, 2013 11:41 PM
    >>> >>>> *Subject:* Re: [PHP] undef func
    >>> >>>>
    >>> >>>>  Assuming OP is using a distro that uses yum for package 
management;
    >>> >>>> A "yum whatprovides pecl" should provide the package name that 
needs >>>> to
    >>> >>>> be
    >>> >>>> installed, in case of an apt based distro, this could be done >>>> 
through
    >>> >>>> aptitude. Either way, it seems what might provide more information 
>>>> is
    >>> >>>> details like the commands executed, the distro used and the errors
    >>> >>>> received
    >>> >>>>
    >>> >>>> HTH
    >>> >>>>
    >>> >>>>  Kind regards/met vriendelijke groet,
    >>> >>>>
    >>> >>>> Serge Fonville
    >>> >>>>
    >>> >>>> http://www.sergefonville.nl
    >>> >>>>
    >>> >>>> Convince Microsoft!
    >>> >>>> They need to add TRUNCATE PARTITION in SQL Server
    >>> >>>>
    >>> >>>> 
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table
    >>> >>>>
    >>> >>>>
    >>> >>>> 2013/5/10 georg <georg.chamb...@telia.com>
    >>> >>>>
    >>> >>>>> noop, didnt take, no such package, was my reward
    >>> >>>>>
    >>> >>>>> /georg
    >>> >>>>>   ----- Original Message -----
    >>> >>>>>   From: Gabriel Ricci
    >>> >>>>>   To: georg
    >>> >>>>>   Cc: Daniel Brown ; tamouse mailing lists ; PHP General
    >>> >>>>>   Sent: Friday, May 10, 2013 11:06 PM
    >>> >>>>>   Subject: Re: [PHP] undef func
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>   To have pecl, you need to install PEAR first, "yum install 
>>>>> php-pear"
    >>> >>>>> (or "yum install php5-pear") should work.
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>   Then you can try "pecl install pdo_odbc."
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>   Att.
    >>> >>>>>
    >>> >>>>>   Gabriel Ricci
    >>> >>>>>   ____________________
    >>> >>>>>
    >>> >>>>>   Website
    >>> >>>>>   Follow @gabrielricci
    >>> >>>>>   Facebook profile, GitHub profile
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>   On Fri, May 10, 2013 at 6:03 PM, georg 
<georg.chamb...@telia.com>
    >>> >>>>> wrote:
    >>> >>>>>
    >>> >>>>>     unfortunately that didnt take, pecl is undefined command (my 
>>>>> linux
    >>> >>>>> is
    >>> >>>>> not so strong)
    >>> >>>>>     trying yum renders no such package
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>     ----- Original Message ----- From: "Daniel Brown"
    >>> >>>>> <danbr...@php.net>
    >>> >>>>>     To: "tamouse mailing lists" <tamouse.li...@gmail.com>
    >>> >>>>>     Cc: "georg" <georg.chamb...@telia.com>; "PHP General" <
    >>> >>>>> php-gene...@lists.php.net>
    >>> >>>>>     Sent: Friday, May 10, 2013 9:21 PM
    >>> >>>>>     Subject: Re: [PHP] undef func
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>       On Fri, May 10, 2013 at 3:18 PM, tamouse mailing lists
    >>> >>>>>       <tamouse.li...@gmail.com> wrote:
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>         Aren't DLLs a Windows thing?
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>          Yeah, I misread the bit about "MS XP" and thought he was
    >>> >>>>> using XP
    >>> >>>>>       for this install.  I just realized the remainder of the
    >>> >>>>> discussion
    >>> >>>>>       between us was off-list, so - for posterity - my response, 
>>>>> when
    >>> >>>>>       finding out it is indeed a Linux box, is: pecl install 
>>>>> pdo_odbc.
    >>> >>>>>
    >>> >>>>>       --
    >>> >>>>>       </Daniel P. Brown>
    >>> >>>>>       Network Infrastructure Manager
    >>> >>>>>       http://www.php.net/
    >>> >>>>>
    >>> >>>>>       --
    >>> >>>>>       PHP General Mailing List (http://www.php.net/)
    >>> >>>>>       To unsubscribe, visit: http://www.php.net/unsub.php
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>     --
    >>> >>>>>     PHP General Mailing List (http://www.php.net/)
    >>> >>>>>     To unsubscribe, visit: http://www.php.net/unsub.php
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>>>>
    >>> >>
    >>> >> Should be yum install php-devel
    >>> >>
    >>> >> -- >> PHP General Mailing List (http://www.php.net/)
    >>> >> To unsubscribe, visit: http://www.php.net/unsub.php
    >>> >>
    >>> >
    >>> >
    >>> > -- > PHP General Mailing List (http://www.php.net/)
    >>> > To unsubscribe, visit: http://www.php.net/unsub.php
    >>> >
    >>>
    >>>
    >>
    >>
    >> So far it seems like you've only installed the Pear stuff (that was done
    >> with the yum line) but not the PECL stuff. Try installing the PECL stuff
    >> again now that you have Pear installed.
    >>
    >> Thanks,
    >> Ash
    >> http://www.ashleysheridan.co.uk
    >>
    >>
    >>
    >
    >
    > -- 
    > PHP General Mailing List (http://www.php.net/)
    > To unsubscribe, visit: http://www.php.net/unsub.
    >

    Have you tried finding an rpm for it manually

    http://rpmfind.net/linux/rpm2html/search.php?query=php-pdo_odbc(x86-64)

--- End Message ---

Reply via email to