iall Posted November 22, 2007 Report Share Posted November 22, 2007 Labdien , SELECT * FROM dati ORDER BY jaunumi ASC WHERE id = '$id' Kad ierakstu šādu rindu man izmet kļūdu.Gribēju panākt lai virsraksts jaunumiem ir klikojams ar id. Piem.: http://lapa.lv/radit.php?id=2 <-- kad uzeju ar peles kursoru uz virsrakstu ,bet nespiežu viņam vajadzētu parādīt apmēram tā. Nesanak man tā! :/ Link to comment Share on other sites More sharing options...
andrisp Posted November 22, 2007 Report Share Posted November 22, 2007 man izmet kļūdu Nu tad parādi to kļūdu. http://lapa.lv/radit.php?id=2 <-- kad uzeju ar peles kursoru uz virsrakstu ,bet nespiežu viņam vajadzētu parādīt apmēram tā. Kā "apmēram tā" ? Link to comment Share on other sites More sharing options...
iall Posted November 22, 2007 Author Report Share Posted November 22, 2007 Nu tad parādi to kļūdu. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\liek\jaunumi\radit.php on line 12 radit.php - http://paste.php.lv/6472 Kā "apmēram tā" ? http://lapa.lv/radit.php?id=2 <-- apakšā ,status barā ,tur kur rādās connecting ,waiting u.t.t. Link to comment Share on other sites More sharing options...
andrisp Posted November 22, 2007 Report Share Posted November 22, 2007 (edited) Pēc mysql_query() ieliec mysql_error(). Tikko pamanīju - ORDER BY jābūt pašās beigās kverijam. Par to otro: ja tev ir links <a href="http://lapa.lv/radit.php?id=2">bla</a>, tad visam vajadzētu strādāt un rādīties (tas gan aktarīgs no pārlūka). Edited November 22, 2007 by andrisp Link to comment Share on other sites More sharing options...
iall Posted November 22, 2007 Author Report Share Posted November 22, 2007 Kad izdaru šitā: SELECT * FROM dati WHERE id = '$id' ORDER BY jaunumi ASC Tad izvada tikai tukšu lapu! Kad pieliku mysql_error(); un atstāju šādi: SELECT * FROM dati ORDER BY jaunumi ASC WHERE id = '$id' tad izvada šo: 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 'WHERE id = ''' at line 1 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\liek\jaunumi\radit.php on line 14 Link to comment Share on other sites More sharing options...
andrisp Posted November 22, 2007 Report Share Posted November 22, 2007 $id ir tukšs. Link to comment Share on other sites More sharing options...
iall Posted November 22, 2007 Author Report Share Posted November 22, 2007 Tā izskatās ,bet kā lai es viņu dabūnu pilnu? :) Link to comment Share on other sites More sharing options...
andrisp Posted November 22, 2007 Report Share Posted November 22, 2007 bah. Link to comment Share on other sites More sharing options...
Vebers Posted November 22, 2007 Report Share Posted November 22, 2007 (edited) $id = (!empty($_GET['id']) ? intval($_GET['id'] : 1; EDIT: iemācies debugot savu skriptu, piemēram, ar to pašu mysql_error(), var_dump() (paskaties vai tiešām kaut ko tā vērtība satur), utt utjp Edited November 22, 2007 by MakaTaNaw Link to comment Share on other sites More sharing options...
iall Posted November 22, 2007 Author Report Share Posted November 22, 2007 (edited) aaaaah :/ un man likās ,ka tas nav grūti! Nepareizi likās. Edited November 22, 2007 by iall Link to comment Share on other sites More sharing options...
Kavacky Posted November 22, 2007 Report Share Posted November 22, 2007 Nav jau arī. Link to comment Share on other sites More sharing options...
iall Posted November 22, 2007 Author Report Share Posted November 22, 2007 (edited) Kā es varētu padarīt virsrakstu par linku? Edited November 22, 2007 by iall Link to comment Share on other sites More sharing options...
iall Posted November 22, 2007 Author Report Share Posted November 22, 2007 Enībadī? ;( Link to comment Share on other sites More sharing options...
Vebers Posted November 22, 2007 Report Share Posted November 22, 2007 Apac <a href="http://adrese">Virsraksts</a> Link to comment Share on other sites More sharing options...
iall Posted November 22, 2007 Author Report Share Posted November 22, 2007 (edited) ir :) Edited November 22, 2007 by iall Link to comment Share on other sites More sharing options...
Recommended Posts