Jump to content

gralfitox

Members
  • Posts

    17
  • Joined

  • Last visited

gralfitox's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That's exactly what i want. Use the variables ( user selections) to obtain an id from other table before sending the form and then send the user selection plus the obtained id to the db
  2. Let me say I am not english speaker , so sorry about my english. Ill try once more to explain myself. User fills form with venta, compra, taller, regula_mas,regula_menos, id_lente, id_cil and id_esf. With this data I need to obtain an id_item wich is needed in the db row to be inserted. This is why I need to use the form variables before sending them, to obtain the id_item and send it with the other data to the db. I have found a temp solution wich is sending the form data to other page, there I have the variables and I get the id_item, and then I send them all to the db, but if possible I prefer a one step solution. Hope I have explined better this time.
  3. first of all , this is going to run on my own pc so security doesn´t matter at all. what I´m trying to do is get the user selections to obtain an id_item that has to be sent to the db with the form . I fixed temporary it by sending the form to a page and there get the data, obtain the id_item and resend it all to the db via hidden fields. but I´m looking for an elegant solution I know there´s a lot of outdated code, I´m coding from dreamweaver, because my knowledge is very limited.
  4. ups, fixed but this is not the problem. the point that I need to obtain an id_item with the user selections before sending it to the db, because the id_tiem should be sent too.
  5. ...to obtain an id_item users doesn´t know and I need to send to the DB I got this <?php require_once('Connections/conexxion.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO movimiento (venta, compra, taller, regula_mas, regula_menos, id_lente, id_cil, id_esf) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['venta'], "int"), GetSQLValueString($_POST['compra'], "int"), GetSQLValueString($_POST['taller'], "int"), GetSQLValueString($_POST['regula_mas'], "int"), GetSQLValueString($_POST['regula_menos'], "int"), GetSQLValueString($_POST['id_lente'], "int"), GetSQLValueString($_POST['id_cil'], "int"), GetSQLValueString($_POST['id_esf'], "int")); mysql_select_db($database_conexxion, $conexxion); $Result1 = mysql_query($insertSQL, $conexxion) or die(mysql_error()); } mysql_select_db($database_conexxion, $conexxion); $query_lente = "select id_lente, lente from lentes"; $lente = mysql_query($query_lente, $conexxion) or die(mysql_error()); $row_lente = mysql_fetch_assoc($lente); $totalRows_lente = mysql_num_rows($lente); mysql_select_db($database_conexxion, $conexxion); $query_esfera = "SELECT * FROM esfera"; $esfera = mysql_query($query_esfera, $conexxion) or die(mysql_error()); mysql_select_db($database_conexxion, $conexxion); $query_cilindro = "SELECT * FROM cilindro"; $cilindro = mysql_query($query_cilindro, $conexxion) or die(mysql_error()); $query_item = "select id_item from item inner join rx on rx.id_rx = item.id_rx inner join cilindro on cilindro.id_cil = rx.id_cil inner join esfera on esfera.id_esf = rx.id_esf where cilindro = ".$_POST['sel_cil']." and esfera = ".$_POST['sel_esf']." and id_lente =". $_POST['sel_lente']; $idlente = mysql_query($query_lente, $conexxion) or die (mysql_error()); ?> <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1"> <table align="center"> <tr valign="baseline"> <td nowrap="nowrap" align="right">Venta:</td> <td><input type="text" name="venta" value="" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Compra:</td> <td><input type="text" name="compra" value="" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Taller:</td> <td><input type="text" name="taller" value="" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Regula_mas:</td> <td><input type="text" name="regula_mas" value="" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Regula_menos:</td> <td><input type="text" name="regula_menos" value="" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">lente:</td> <td><?php echo "<select name='sel_lente'>"; while($row= mysql_fetch_array($lente)){?> <option value=" <?php echo $row['id_lente'] ;?> " > <?php echo $row['lente']; ?> </option> <?php } ?> </select> <label for="id_lente"></label></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">cilindro:</td> <td><?php echo "<select name='sel_cil'>"; while($row= mysql_fetch_array($cilindro)){?> <option value=" <?php echo $row['id_cil'] ;?> " > <?php echo $row['cilindro']; ?> </option> <?php } ?> </select> <label for="id_cil"></label></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Esfera:</td> <td><?php echo "<select name='sel_esf'>"; while($row= mysql_fetch_array($esfera)){?> <option value=" <?php echo $row['id_esf'] ;?> " > <?php echo $row['esfera']; ?> </option> <?php } ?> </select></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">id_lente</td> <td><label for="id_lente3"></label> <input type="text" name="id_lente" id="id_lente3" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"> </td> <td><input type="submit" value="Insert record" /></td> </tr> </table> <input type="hidden" name="MM_insert" value="form1" /> </form> <?php mysql_free_result($esfera); mysql_free_result($cilindro); mysql_free_result($lente); ?> and with this query $query_item = "select id_item from item inner join rx on rx.id_rx = item.id_rx inner join cilindro on cilindro.id_cil = rx.id_cil inner join esfera on esfera.id_esf = rx.id_esf where cilindro = ".$_POST['sel_cil']." and esfera = ".$_POST['sel_esf']." and id_lente =". $_POST['sel_lente']; $idlente = mysql_query($query_lente, $conexxion) or die (mysql_error()); I would obtain the id_item, but , how?, because the form it´s not procesed and I´m getting no variable values.
  6. ok, now works , didn´t realize the mysqli point. 1 more question 1- how do you reversed the order of the column heads?
  7. hi again, so with this code <?php require_once('Connections/conexxion.php'); mysql_select_db($database_conexxion, $conexxion); ?> <html> <body> <?php // // GET CILINDRO VALUES // $sql = "SELECT cilindro FROM cilindro ORDER BY cilindro"; $cilindro = array(); $res = $mysqli->query($sql); while ($row = $res->fetch_row()) { $cilindro[] = $row[0]; } $thead = "<tr><th></th><th>" . join('</th><th>', $cilindro) . "</th></tr>\n"; $initial = array_fill_keys($cilindro, ''); // empty initial array for each row // // GET STOCK VALUES // $sql = "SELECT sum(compra+regula_mas-venta-taller-regula_menos) as stock , cilindro , esfera FROM movimiento JOIN item ON item.id_item=movimiento.id_item JOIN rx ON rx.id_rx=item.id_rx JOIN cilindro ON cilindro.id_cil=rx.id_cil JOIN esfera ON esfera.id_esf=rx.id_esf GROUP BY esfera, cilindro ORDER BY esfera DESC"; $tdata = ''; $currEsfera = ''; $esfdata = $initial; $res = $mysqli->query($sql); while (list($stock,$cil, $esf) = $res->fetch_row()) { if ($esf != $currEsfera) { // change of esfera? if ($currEsfera) { // don't want initial balank values $tdata .= "<tr><td>$currEsfera</td><td>".join('</td><td>', $esfdata)."</td></tr>\n"; } $currEsfera = $esf; $esfdata = $initial; } $esfdata[$cil] = $stock; } // output row for final esfera value $tdata .= "<tr><td>$currEsfera</td><td>".join('</td><td>', $esfdata)."</td></tr>\n"; ?> <table border='1'> <?php echo $thead, $tdata?> </table> </body> </html> I got this
  8. sorry but no result. maybe a problem with cilindro values, you´re getting all the cilindro values and in this id_item cilindro values take values from 0.00 to -2.00 in 0.25 steps??
  9. well, studying a little I´ve written this <?php require_once('Connections/conexxion.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_conexxion, $conexxion); $query_Recordset1 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 1"; $Recordset1 = mysql_query($query_Recordset1, $conexxion) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); mysql_select_db($database_conexxion, $conexxion); $query_fila2 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 1,2"; $fila2 = mysql_query($query_fila2, $conexxion) or die(mysql_error()); $row_fila2 = mysql_fetch_assoc($fila2); $totalRows_fila2 = mysql_num_rows($fila2); mysql_select_db($database_conexxion, $conexxion); $query_fila3 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 3,3"; $fila3 = mysql_query($query_fila3, $conexxion) or die(mysql_error()); $row_fila3 = mysql_fetch_assoc($fila3); $totalRows_fila3 = mysql_num_rows($fila3); mysql_select_db($database_conexxion, $conexxion); $query_fila4 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 6,4"; $fila4 = mysql_query($query_fila4, $conexxion) or die(mysql_error()); $row_fila4 = mysql_fetch_assoc($fila4); $totalRows_fila4 = mysql_num_rows($fila4); mysql_select_db($database_conexxion, $conexxion); $query_fila5 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 10,5"; $fila5 = mysql_query($query_fila5, $conexxion) or die(mysql_error()); $row_fila5 = mysql_fetch_assoc($fila5); $totalRows_fila5 = mysql_num_rows($fila5); mysql_select_db($database_conexxion, $conexxion); $query_fila6 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 15,6"; $fila6 = mysql_query($query_fila6, $conexxion) or die(mysql_error()); $row_fila6 = mysql_fetch_assoc($fila6); $totalRows_fila6 = mysql_num_rows($fila6); mysql_select_db($database_conexxion, $conexxion); $query_fila7 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 21,7"; $fila7 = mysql_query($query_fila7, $conexxion) or die(mysql_error()); $row_fila7 = mysql_fetch_assoc($fila7); $totalRows_fila7 = mysql_num_rows($fila7); mysql_select_db($database_conexxion, $conexxion); $query_fila8 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 28,8"; $fila8 = mysql_query($query_fila8, $conexxion) or die(mysql_error()); $row_fila8 = mysql_fetch_assoc($fila8); $totalRows_fila8 = mysql_num_rows($fila8); mysql_select_db($database_conexxion, $conexxion); $query_fila9 = "SELECT venta,compra,taller,regula_mas,regula_menos,movimiento.id_item,sum(compra+regula_mas-venta-taller-regula_menos) as stock, cilindro, esfera FROM movimiento join item on item.id_item=movimiento.id_item join rx on rx.id_rx=item.id_rx join cilindro on cilindro.id_cil=rx.id_cil join esfera on esfera.id_esf=rx.id_esf GROUP BY movimiento.id_item ORDER BY esfera desc, cilindro desc limit 36,25"; $fila9 = mysql_query($query_fila9, $conexxion) or die(mysql_error()); $row_fila9 = mysql_fetch_assoc($fila9); $totalRows_fila9 = mysql_num_rows($fila9); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>test</title> </head> <body> <table align=center> <tr> <td width="40px;" align="center"> </td> <td width="40px;" align="center">0.00</td> <td width="40px;" align="center">-0.25</td> <td width="40px;" align="center">-0.50</td> <td width="40px;" align="center">-0.75</td> <td width="40px;" align="center">-1.00</td> <td width="40px;" align="center">-1.25</td> <td width="40px;" align="center">-1.50</td> <td width="40px;" align="center">-1.75</td> <td width="40px;" align="center">-2.00</td> </tr> <tr> <td align="center"><?php echo $row_Recordset1['esfera']; ?></td> <td align="center"><?php echo $row_Recordset1['stock']; ?></td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> </tr> <tr> <td align="center"><?php echo $row_fila2['esfera']; ?></td> <?php do { ?><td align="center"> <?php echo $row_fila2['stock']; ?> </td><?php } while ($row_fila2 = mysql_fetch_assoc($fila2)); ?> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> </tr> <tr> <td align="center"><?php echo $row_fila3['esfera']; ?></td> <?php do { ?><td align="center"> <?php echo $row_fila3['stock']; ?> </td><?php } while ($row_fila3 = mysql_fetch_assoc($fila3)); ?> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> </tr> <tr> <td align="center"><?php echo $row_fila4['esfera']; ?></td> <?php do { ?> <td align="center"><?php echo $row_fila4['stock']; ?></td> <?php } while ($row_fila4 = mysql_fetch_assoc($fila4)); ?> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> </tr> <tr> <td align="center"><?php echo $row_fila5['esfera']; ?></td> <?php do { ?> <td align="center"><?php echo $row_fila5['stock']; ?></td> <?php } while ($row_fila5 = mysql_fetch_assoc($fila5)); ?> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> </tr> <tr> <td align="center"><?php echo $row_fila6['esfera']; ?></td> <?php do { ?> <td align="center"><?php echo $row_fila6['stock']; ?></td> <?php } while ($row_fila6 = mysql_fetch_assoc($fila6)); ?> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> </tr> <tr> <td align="center"><?php echo $row_fila7['esfera']; ?></td> <?php do { ?> <td align="center"><?php echo $row_fila7['stock']; ?></td> <?php } while ($row_fila7 = mysql_fetch_assoc($fila7)); ?> <td align="center" bgcolor="#0000FF"> </td> <td align="center" bgcolor="#0000FF"> </td> </tr> <tr> <td align="center"><?php echo $row_fila8['esfera']; ?></td> <?php do { ?> <td align="center"><?php echo $row_fila8['stock']; ?></td> <?php } while ($row_fila8 = mysql_fetch_assoc($fila8)); ?> <td align="center" bgcolor="#0000FF"> </td> </tr> <?php do { ?> <tr> <td align="center"><?php echo $row_fila9['esfera']; ?></td> <td align="center"><?php echo $row_fila9['stock']; ?></td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> </tr> <?php } while ($row_fila9 = mysql_fetch_assoc($fila9)); ?> <tr> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> </tr> </table> <?php $columnas = 9; # Número de columnas (variable) for ($i=1; $row = mysql_fetch_row ($Recordset1); $i++) { $resto = ($i % $columnas); # Número de celda del <tr> en que nos encontramos if ($resto == 1) {echo "<tr>";} # Si es la primera celda, abrimos <tr> echo "<td width=\"40px;\" align=\"center\">$row[1]</td>"; if ($resto == 0) {echo "</tr>";} # Si es la última celda, cerramos </tr> } if ($resto <> 0) { # Si el resultado no es múltiple de $columnes acabamos de rellenar los huecos $ajust = $columnas - $resto; # Número de huecos necesarios for ($j = 0; $j < $ajust; $j++) {echo "<td> </td>";} echo "</tr>"; # Cerramos la última línea </tr> } mysql_close($connexion); echo "</table>"; ?> </body> </html> <?php mysql_free_result($fila1); mysql_free_result($Recordset1); mysql_free_result($fila2); mysql_free_result($fila3); mysql_free_result($fila4); mysql_free_result($fila5); mysql_free_result($fila6); mysql_free_result($fila7); mysql_free_result($fila8); mysql_free_result($fila9); mysql_free_result($consulta); ?> with this result now I have 25 rows in the table that can be filled up to 9 results, you can see that there are 9 results for 2.00, 9 for 1.75 and so on but I am unable to achive this. I can see that creating a new query for every row is a solution, but 25 + 9 more querys.... maybe too many queries?
  10. I have a table cilindro with all possible values, and a esfera table too. What do you mean fixd columns? Sorry i was editing while you were answering
  11. Ok, so column heading is the cilindro.cilindro value and row heading is esfera.esfera value. I'm at my mobile and have no access to my db. I'll post my schema model to see what's possible to do Let me try to explain myself again, I'm not english speaker so sorry about it. I have filled the movimiento table with all possible rx combinations for testing pourposes. So i have 1 item id 1 in stock with rx 4.00 esf 0.00 cil 2 item id 1 in stock with rx 3.75 esf 0.00 cil 3 item id 1 in stock with rx 3.75 esf -0.25 cil 4 item id 1 in stock with rx 3.50 esf 0.00 cil An so on, is clear this way?
  12. row and column headings are not query results, they are always the same and I can use the table as template for all my products, I mean that the only thing I want to achieve is to fill the blank cells this way, take a look I don´t know if I explain myself.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.