Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [MySQL][JavaScript][PHP] Przyjemny paginator - pomoc
laikkk
post 28.07.2011, 11:48:42
Post #1





Grupa: Zarejestrowani
Postów: 30
Pomógł: 0
Dołączył: 12.11.2010

Ostrzeżenie: (0%)
-----


Witam , Czy znacie jakies praktyczne i ladnie wygladajace paginatory? ja znalazlem w necie cos takiego
Paginator
tylko nie wiem jak dopasowac go do mojego kodu:(. Dodam jeszcze ze pare zmiennych przesylam getem do innych podstron.

Ten post edytował laikkk 28.07.2011, 12:07:49
Go to the top of the page
+Quote Post
CuteOne
post 28.07.2011, 11:56:06
Post #2





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

Ostrzeżenie: (0%)
-----


...... temat ze względu na swój poziom powinien być zamknięty a Tobie laik przyda się dobry słownik
Go to the top of the page
+Quote Post
laikkk
post 28.07.2011, 13:09:14
Post #3





Grupa: Zarejestrowani
Postów: 30
Pomógł: 0
Dołączył: 12.11.2010

Ostrzeżenie: (0%)
-----


znalazlem jeszcze cos takiego
http://net.tutsplus.com/tutorials/php/how-...age-2/#comments
ale jak go probuje uzyc to wywala taki blad

QUERY ERROR: 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 '-25,25' at line 1

oto moj kod
  1. include('paginator.class.php');
  2. include('conect.php');
  3.  
  4. $sql= 'SELECT COUNT (*) FROM objekty';
  5. $result = mysql_query($sql);
  6.  
  7. $pages = new Paginator;
  8. $pages->items_total = $num_rows[0];
  9. $pages->mid_range = 9;
  10. $pages->paginate();
  11. echo $pages->display_pages();
  12. echo $pages->display_jump_menu()
  13. . $pages->display_items_per_page() ;
  14.  
  15. echo $pages->display_pages();
  16. // *** Get records. List by Email, then by time in ascending order.
  17. //$limitClause = ?LIMIT $startRecord, $numRecsPerPage?;
  18. $sql = 'SELECT * FROM demoty ORDER BY id '.$pages->limit.' ';
  19. $result = mysql_query($sql);
  20.  
  21. if (!$result) {
  22. exit('QUERY ERROR: ' . mysql_error());
  23. } else {
  24. $numRecords = mysql_num_rows($result);
  25. if ($numRecords >=1) {
  26. // *** Display the user list.
  27. echo('List of Users from Government Subscribe Table');
  28. $tableRow = ?;
  29. while($row = mysql_fetch_assoc($result)) {
  30. $id = $row['id'];
  31. $email = $row['podpis'];
  32. $time = $row['name'];
  33. $tableRow .= ''.$email.'
  34. Delete |
  35. Edit |
  36. Transfer to Unsubscribe ';
  37. }
  38. $tableHeader = ' EMAILTIMEACTION ';
  39. echo $tableHeader;
  40. echo $tableRow;
  41. } else {
  42. echo('No records were found in the database.');
  43. }
  44. }


Bym był wdzięczny gdyby ktos mi pomogl

Ten post edytował laikkk 28.07.2011, 13:22:11
Go to the top of the page
+Quote Post
amii
post 28.07.2011, 13:18:03
Post #4





Grupa: Zarejestrowani
Postów: 728
Pomógł: 76
Dołączył: 12.06.2009

Ostrzeżenie: (0%)
-----


http://forum.php.pl/index.php?showtopic=35...t=0&start=0


--------------------
gry flash online
Dobry hosting i tanie odnowienia domen firma: masternet.
Zarabianie bez wysiłku na domenach bez ruchu: prolink.
Go to the top of the page
+Quote Post
laikkk
post 28.07.2011, 13:23:16
Post #5





Grupa: Zarejestrowani
Postów: 30
Pomógł: 0
Dołączył: 12.11.2010

Ostrzeżenie: (0%)
-----


ten paginator co podales wiem ze on dziala bo go kiedys jzu uzylem ale wolałbym rozgrysc tego co podalem wyzej
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 12:57