How do I iterate with a array that I bring from the database in php and then send all those data obtained by a JSON to my view?
This is what I have so far:
$conn = new mysqli($host, $user, $pass, $db);
$errores = array();
if...
Hi, I have a code that works to insert multiple records but only one array, I plan to add more inouts with different arrays but I can not find how to modify the part of the arrays. I imagine that in the case of the sql it would be something like...
I have the following code:
$lineas="";
$fechaAnt="";
for ($l=0; $l < count($dat); $l++) {
if($dat[$l][0]!=$fechaAnt || $fechaAnt==""){ //Si tu fecha es diferente a la anterior o es igual a vacio porque es la primera vez
$...
I need to take the average of the grades presented in this exercise, the exercise told me to get grades by average and by subject but I really do not know how to make that average in php I have only managed to display the values
<?php
$cali...
I have a static variable in my webform class, which are coordinates for a Google map
public static string Query = "19.475 -91.97500000 19.475 -91.98333333 19.4833333 -91.98333333 19.4833333 -92.01666666 19.5 -92.01666666 19.5 -92.025 19.533333...
I have this little problem in Ruby, I have an api with this response:
response: [
{
waspurchase: 1,
purchase_data: {
gateway: "plazavipgate",
gateway_text: "TEXT_PGS_PAYMENT_ASD_ASD_ASD",
gateway_data: {
car...
I have a query:
SELECT * FROM items ORDER BY title ASC
which brings me the results ordered in alphabetical order.
now, separate with php, each block the results according to your initial letter
Letter A
Alibaba
Andres
Letter B...
I am starting my studies in Python and I need to make this code for my class.
Basically it consists in the registration of the workers of a company to calculate their salary / salary, applying some discounts and bonuses / incentives.
In op...
I have a pseudo graph conformed by adjacency lists, where tree is an array of "lista_t"
typedef struct nodo {
int value;
struct nodo *next;
} nodo_t;
typedef struct {
nodo_t *primero;
nodo_t *ultimo;
int len;
} lista_t;
Well and...
I try to make a query with $ .post from JQuery doing the following:
function consultaAjax(url, val){
arreglo = { id: val };
datos = JSON.stringify(arreglo);
$.post(
url,
datos,
fun...