Categoria: Database

  • Howto: mysql obtain the right sorting for nested records from the same table

    In those latest days I was wondering how to sort a table in mySQL that has an id a parent_id and a order column like the one that follows: id | parent_id | ordr | title —+———–+——+———————————- 1 | 0 | 1 | first section 2 | 0 | 2 | second section 3 | […]

  • oci_bind_by_name and placeholder name limit

    Today I was working on a web-application using ALPHA Framework, and accidentally I discovered a problem using the oci_bind_by_name method. The oci_bind_by_name role is to create a relationship between a php variable and an oracle placeholder (eg. :OracleVariableName)  to be used in the context of the prepared statement.

  • Resettare la password di un utente con una query SQL

    Ultimamente mi è capitato di dover accedere ad un vecchio sito in locale che avevo fatto con WordPress, il problema che avevo era di non ricordare la password dell’unico utente che avevo configurato e non avevo voglia di riconfigurarmi un nuovo WordPress con gli stessi plugin per poter riprodurre una situazione analoga. Unica soluzione che […]

  • Riportare tutti gli articoli di una categoria in bozza

    Mi è capitato per il sito di IWA Italy di dover riportare tutti gli articoli afferenti ad una precisa categoria in bozza. Poichè il numero di articoli era troppo elevato per effettuare un’operazione individuale ho dovuto fare un’operazione di massa utilizzando degli script mySQL.