Posts by Luann Sousa • 33 points
6 posts
-
0
votes1
answer86
viewsQ: How to return a query column within a class
I’m updating my entire project to object-oriented PDO, but I’m having some difficulty returning a fetch column in the class query User. After several attempts, so was my code: user php. Class User {…
-
1
votes1
answer104
viewsQ: How to generate javascript functions within while
I am developing a Soundboard, and in this code, each <audio> is generated by record found in the database, and each of them has a volume controller, however, all controllers only work pro last…
-
0
votes1
answer30
viewsQ: Help with logic UPDATE using queries
It’s the following guys, I have two tables, the table esc_usuarios which contains information from registered users and esc_usuarios_slog, that contains the records of the casualties, in which they…
-
0
votes2
answers811
viewsQ: "Illegal string offset" error when calling usort in database data
I am trying to sort the result by a specific column of a database array. function cmp($a, $b) { return strcmp($a['usu_codigo'], $b['usu_codigo']); }; usort($usu_info_coluna, "cmp"); Giving a…
-
0
votes1
answer41
viewsQ: How to insert a keyword into a database search already performed
For example, I did a search of all user data in the database to echo in different columns by the site: $stmt = $conexao->prepare("SELECT * FROM esc_usuarios WHERE usu_codigo = ?");…
-
1
votes1
answer179
viewsQ: Adding +x to each record returned in a SELECT
For example, in a select in the bank, will be returned 5 records: SELECT * FROM esc_usuarios WHERE usu_indicador_codigo = '" . $_SESSION['codigo'] . "' AND usu_situacao = 'ativo'" Then I want to…