PHP Link Directory y vínculos de Importación

He luchado esta noche con PHP Link Directory. Tenía una lista de direcciones que quería añadir a granel y las arreglé para encadenar el formato correcto de un archivo CSV para su importación. Es algo así como una larga historia, que comenzó con lince el vertido de la fuente de una página web, sed trimming just the links, then just the link titles, etc. Finally a few scripts later I had a basic spreadsheet. Added NULL values in a few fields and tried the import. Everything looked good, so I thought I’d test adding a link through the user interface and see if everything was good.

At this point I noticed that my imported links weren’t displaying. My first guess was that the cache needed clearing, but that didn’t solve it, so I looked at the database. I had forgotten to set the expiration date to NULL for all of them. (The new links had defaulted to 0). Bueno, so I added a link and then noticed one of my imported links had vanished. I suspected that the auto-increment of mysql had failed to acknowledge the imported data. I went through alter-ing the table to set the auto-increment value higher, but it still stomped over existing records when adding a link through the user interface.

Strangely the following command didn’t seem to work
ALTER TABLE name_of_table AUTO_INCREMENT = 500

Finalmente, I dropped the id field entirely and recreated it. Autonumbering gave me numbers up to 404, so I added a new link to test and id #395 was stomped (the id had already been used by another link, but now it was replaced with the new link.)…. but I thought dumping the ID field would make it forgetAt that point I noticed a little table with one field called PLD_Link_SEQthe one field was id andit was displaying 395… (smack head!) Son, I updated that to 405 and added a link and all worked as expected.

As an odd side effect, it looks like if a link had been featured and it’s number was claimed by a new link, the new link automatically became featured as well.

Son, if you try importing links into phpld from a self made csv or other import file, make note of the PLD_LINK_SEQ table and make sure to set it to a number so it doesn’tstep onyour previous entries.

My other suggestion if you’re going to do an import like this from csv. Start by downloading a backup in csv format of your current links. Do this so you can make sure you have the correct number of columns. (Even if you put NULL in the last column, that’s fine.) You might want to prepare yourself for the possibility of doing MYSql commands after the import. I had to set the expire date field to NULL where the expire date =0 (With the expire date at 0 the link doesn’t show.) Son, brush up on your sql query syntax before you start importing.

Artículos Relacionados

Blog Traffic Exchange Artículos Relacionados
  • Rsync para facilitar la (y rápida) copias de seguridad Tengo que decir, No he pasado suficiente tiempo con rsync para realmente tener fluidez en cómo podría ponerlo a trabajar .... Una semana atrás estaba leyendo esta lista de software esencial Linux por un hombre que pasó de Mac OS X a Linux porque ......
  • Cómo quitar TRE Antivirus | TRE Antivirus Guía de eliminación TRE Antivirus es una nueva entrada en la Familia Wini de rogue software antivirus. Esta familia incluye SoftCop (SoftCop eliminación), Softsoldier (Cómo eliminar SoftSoldier), ( TrustFighter TrustFighter Guía de eliminación, TrustSoldier Guía de eliminación y los otros siguientes ... SafeFighter (Safefighter eliminación), TrustCop (TrustCop Guía de eliminación), SecureWarrior (SecureWarrior eliminación), SecurityFighter (SecurityFighter eliminación),......
  • Lista de paquetes de software de código abierto La siguiente es larga, pero no es probable completar. Esta es una lista de paquetes de software de código abierto: El software informático licenciado bajo una licencia de código abierto. El software que se ajusta a la definición de software libre puede ser más apropiadamente llamado software libre; el proyecto GNU en los objetos particulares de sus obras se conoce como ......
Blog Traffic Exchange Sitios Web relacionados
  • Principles of Good SEO for Your Blog Regardless of whether you are writing a blog simply because you enjoy having a lot of people reading your thoughts, or if you are writing a blog because you are looking to generate income, one of the most important things that you need to do is maximize the SEO or......
  • Link Building- Path To Get Conversions The best way to optimize your site on the search engines is to build quality in bound links that point to your site. These in bound links are considered by the search engines while ranking your sites. The more number of back links the better your site ranks. You also......
  • Our Organic SEO Process Organic search engine optimization Consists of Many Parts, Each On-page and Off-page. Website Evaluation We first want to determine in case your site has bad website positioning, or zero SEO. We consider the negatives and positives with a purpose to determine if we may help your enterprise obtain natural internet......
PDF24    Enviar artículo como PDF   

Mensajes similares

Vea lo que sucedió este día en la historia de cualquiera de BBC Wikipedia
Palabras clave:
Amazon Logo

Los comentarios están cerrados.

Cambie a nuestro sitio móvil