hEiti Posted June 19, 2008 Report Share Posted June 19, 2008 (edited) Nesaprotu kapec vinsh negrib man shito laist.. :( ideja tada kad dropdown menju izvelies kategoriju un atkarigi no ta ko tu izvelejies priexa select from _serija pieliek izveletas grupas saisinato apzimejum t.i. gr/fr/etc.. :( <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <form name="serija" method="post" action=""> <select name="select"> <option value="gr">GR Series</option> <option value="fr">FR Series</option> </select> </form> <?php $con = mysql_connect("localhost",":)",":)"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("db", $con); $result = mysql_query("SELECT * FROM '$_POST[serija]'_produkti ORDER BY celtspeja ASC"); echo "<table border='1'> <tr> <th>Grupa</th> <th>Modelis</th> <th>Celtspēja </th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['grupa'] . "</td>"; echo "<td>" . $row['modelis'] . "</td>"; echo "<td>" . $row['celtspeja'] . "t</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Edited June 19, 2008 by hEiti Link to comment Share on other sites More sharing options...
Aleksejs Posted June 19, 2008 Report Share Posted June 19, 2008 Jā, nezin gan... Varbūt pastāsti vairāk kā izpaužas "nezin kas" un kā "negrib laist"... http://datubazes.wordpress.com/2008/05/27/...zdot-jautajumu/ http://weblogs.sqlteam.com/jeffs/archive/2...not-answer.aspx Link to comment Share on other sites More sharing options...
hEiti Posted June 19, 2008 Author Report Share Posted June 19, 2008 bez lielam apsratibam un gudribam ja negribi palidzet ej dirst .. ;) pietiekoshi atsauciga tauta sheit ... Link to comment Share on other sites More sharing options...
andrisp Posted June 19, 2008 Report Share Posted June 19, 2008 hEiti, ar shaadu attieksmi no tavas puses, veel mazaak gribas atbildeet. Tas, ko Aleksejs tev saka - noraksturo, kas tieshi nestraadaa. Tu domaa, ka mees no shitajiem "negrib man shito laist" varam izziileet, kur vaina ir ? Link to comment Share on other sites More sharing options...
hEiti Posted June 19, 2008 Author Report Share Posted June 19, 2008 tad ta ari vareja cilvecigi pajautat kad nesaprot textu nevis bast seja kkadas sava googles stulbibas.. ta tad: ir forma drop down menju.. un zem vinja query no db.. bet db daudz tabulas kuram visam kopiga ir beigu dalja _info ta tad man nepiecieshams panakt kad drop down menu tu izvelies piemeram gr tad koda pie daljas kur select from vajag lai ieliek to vardu piem gr_info ja izvelas nr tad nr_info un ta turpinot.. bet nesanak man palaist tadu variantu :( Link to comment Share on other sites More sharing options...
Aleksejs Posted June 19, 2008 Report Share Posted June 19, 2008 (edited) Gaidi vien to atsaucīgo tautu, gaidi. Nevienu reizi nav bijis normāli noformulēts jautājums! N-tās reizes ir teikts - ieslēdz ERROR REPORTING, nav ieslēgts! Ja kāds tērē savu laiku un pajautā jautājumu (kuru Tu nejēdz uzdot), lai varētu noskaidrot, kā varētu palīdzēt, Tu neatbildi! Bonne chance! Edited June 19, 2008 by Aleksejs Link to comment Share on other sites More sharing options...
hEiti Posted June 19, 2008 Author Report Share Posted June 19, 2008 ibio tev dzive ir? ara aiz loga ir gaiss.. ne tikai monitors un cik varu tik atbildu!.. un pagaidam viss ar ko nesmu ticis gala- man cilveki no foruma ir palidzejushi.. Link to comment Share on other sites More sharing options...
hEiti Posted June 19, 2008 Author Report Share Posted June 19, 2008 Andris- $result = mysql_query("SELECT * FROM $_POST[izvelne] ORDER BY celtspeja ASC"); Shi butu ta dalja kur itka no $_POST[izvelne] vertibas vinsh pieliktu klat bet nenotiek ta :( Link to comment Share on other sites More sharing options...
Aleksejs Posted June 19, 2008 Report Share Posted June 19, 2008 Lamāties nav glīti. Link to comment Share on other sites More sharing options...
Klez Posted June 19, 2008 Report Share Posted June 19, 2008 diez vai kāds tev vēl atbildēs, veel jo vairaak ka tu pelni ar citu smadzenēm ... pirms spied submit pogu, padomaa ko esi sarakstiijis ... prasaas peec vaarnas ... par uzbraucieniem un nesakariigiem topikiem. Link to comment Share on other sites More sharing options...
Paulinjsh Posted June 19, 2008 Report Share Posted June 19, 2008 tak ieslēdz error reportingu kā jau tev n reizes ir teikts, jo es tavā tajā piemērā redzu jau vismaz vienu warning. pēc query uzraksti: echo mysql_error(); un izdrukā arī pašu vaicājumu ar echo. Link to comment Share on other sites More sharing options...
hEiti Posted June 19, 2008 Author Report Share Posted June 19, 2008 tak ieslēdz error reportingu kā jau tev n reizes ir teikts, jo es tavā tajā piemērā redzu jau vismaz vienu warning. pēc query uzraksti: echo mysql_error(); un izdrukā arī pašu vaicājumu ar echo. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM _produkti ORDER BY celtspeja ASC' at line 1 Link to comment Share on other sites More sharing options...
andrisp Posted June 19, 2008 Report Share Posted June 19, 2008 Pirms tā mysql_query() ieliec: echo "SELECT * FROM '$_POST[serija]'_produkti ORDER BY celtspeja ASC"; Tad arī redzēsi, kas kverijā par vainu. Bet vispār netikai kverijs ir nepareizs, bet arī pati forma šķība (skaties tieši uz 'name' atribūtiem). Iesaku tev vispirms kārtīgi izprast, kas tās tādas vispār ir. http://www.w3schools.com/html/html_forms.asp Link to comment Share on other sites More sharing options...
hEiti Posted June 19, 2008 Author Report Share Posted June 19, 2008 (edited) SELECT * FROM ''_produkti ORDER BY celtspeja ASCYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''_produkti ORDER BY celtspeja ASC' at line 1 Edited June 19, 2008 by hEiti Link to comment Share on other sites More sharing options...
andrisp Posted June 19, 2008 Report Share Posted June 19, 2008 Nu es zinu, ka tev tā viņš izskatās, bet vai tad tu pats neredzi vainu ? Sāc ar to, ka salabo formu. Link to comment Share on other sites More sharing options...
Recommended Posts