For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > December 2004 > HELP ME









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author HELP ME
NIUNIUŚ

2004-12-22, 8:59 pm

Witam !!!

Zaczęłam się bawić php i mysql i mam nadzieję że mi pomożecie już umiem
połączyć się z bazą dancyh wybrać dane z tabeli posortować je oraz
pogrupować ale mam problem nastepujący

w pliku index.php mam taki kod:

<?
$roz=".php";
$id = $_REQUEST['ulica'];
if (file_exists( $id.$roz ))
{
include( $id.$roz );
}
else
{
include( 'ulica'.$roz );
}
?>

no i działam sobie na index.php?ulica=wybor

ale teraz kiedy zaczęłam się bawić mysql to mam rabelke

ma 3 kulumny w tabeli(baza_powiat) | miasta | ulice | numery |

no i napisałam sobie takie wybieranie

wybor.php

<?php
$zapytanie = "SELECT * FROM baza_powiat WHERE Grupa='Krakow'";
$wynik = mysql_query ($zapytanie) or die (" / zap - niepowodzenie");
while($dane_z_tabeli=mysql_fetch_array($
wynik)){
echo "
<tr>
<td align=\"left\" valign=\"top\">".$dane_z_tabeli['ulice']."</td>
<td align=\"right\" valign=\"top\"><font
color=\"#0000CC\"><b>".$dane_z_tabeli['numery']."</b></font></td>
</tr>";
}
mysql_free_result($wynik);
?>

no i fajny bajer mi wyszedł bo grupuje mi po miastach i wyswietla ulice
z numerami domow

no ale mam z 30 miast w bazie narazie i teraz tak jak ja robie to musze
30 plikow stworzyc dla kazdego miasta oodzielnie

czyli mniej wiecej tak index.php?ulica=wybor1 index.php?ulica=wybor2
index.php?ulica=wybor3 gdzie bedzie kazde miasto osobno wpisane

bo poprostu nie umiem zrobić tego pliku nie wiem jakiegos takiego zeby
mi pobierał z linka np i wstawial automatycznie w Grupa='tu wstawial'
nazwe miasta

pomozcie bo troche juz czasu spędziłąm na szukaniu po FAQ i FORACH i
pewnie gdzieś było rozwiązanie ale zielona jestem jeszcze więc z góry
dziękuje

KASIA
Harrie Verveer

2004-12-23, 8:56 am

could you please try to reformulate your question into english?

NIUNIUŚ wrote:
> Witam !!!
>
> Zaczęłam się bawić php i mysql i mam nadzieję że mi pomożecie już umiem
> połączyć się z bazą dancyh wybrać dane z tabeli posortować je oraz
> pogrupować ale mam problem nastepujący
>
> w pliku index.php mam taki kod:
>
> <?
> $roz=".php";
> $id = $_REQUEST['ulica'];
> if (file_exists( $id.$roz ))
> {
> include( $id.$roz );
> }
> else
> {
> include( 'ulica'.$roz );
> }
> ?>
>
> no i działam sobie na index.php?ulica=wybor
>
> ale teraz kiedy zaczęłam się bawić mysql to mam rabelke
>
> ma 3 kulumny w tabeli(baza_powiat) | miasta | ulice | numery |
>
> no i napisałam sobie takie wybieranie
>
> wybor.php
>
> <?php
> $zapytanie = "SELECT * FROM baza_powiat WHERE Grupa='Krakow'";
> $wynik = mysql_query ($zapytanie) or die (" / zap - niepowodzenie");
> while($dane_z_tabeli=mysql_fetch_array($
wynik)){
> echo "
> <tr>
> <td align=\"left\" valign=\"top\">".$dane_z_tabeli['ulice']."</td>
> <td align=\"right\" valign=\"top\"><font
> color=\"#0000CC\"><b>".$dane_z_tabeli['numery']."</b></font></td>
> </tr>";
> }
> mysql_free_result($wynik);
> ?>
>
> no i fajny bajer mi wyszedł bo grupuje mi po miastach i wyswietla ulice
> z numerami domow
>
> no ale mam z 30 miast w bazie narazie i teraz tak jak ja robie to musze
> 30 plikow stworzyc dla kazdego miasta oodzielnie
>
> czyli mniej wiecej tak index.php?ulica=wybor1 index.php?ulica=wybor2
> index.php?ulica=wybor3 gdzie bedzie kazde miasto osobno wpisane
>
> bo poprostu nie umiem zrobić tego pliku nie wiem jakiegos takiego zeby
> mi pobierał z linka np i wstawial automatycznie w Grupa='tu wstawial'
> nazwe miasta
>
> pomozcie bo troche juz czasu spędziłąm na szukaniu po FAQ i FORACH i
> pewnie gdzieś było rozwiązanie ale zielona jestem jeszcze więc z góry
> dziękuje
>
> KASIA

Hilarion

2004-12-23, 8:56 am

Szczerze mówiąc nie zrozumiałem o co chodzi.
Co chcesz osiągnąć?
Możliwość wypisania na stronie ulic i numerów dla zadanego miasta i / lub ulicy?
Nie bardzo rozumiem ideę wielu plików tylko po to, aby ... coś zrobić (nie
wiem co) z ulicami.

Hilarion

PS.: Piszesz na międzynarodową grupę. Tu zazwyczaj pisze się po angielsku.
PPS.: Używanie warunku WHERE to nie grupowanie, a tylko ograniczanie wyników
zapytania. Grupowanie (służące zazwyczaj do statystyk) osiąga się
klauzulą GROUP BY.


Janwillem Borleffs

2004-12-23, 8:56 pm

Harrie Verveer wrote:
> could you please try to reformulate your question into english?
>


Here's what http://www.poltran.com/ makes of it:

I greet! Begin entertain (play) php and mysql and mum < beguile > < have >
hope < stuff > that you will be helped to to joint with base from table me
data already know (be able) choose sort it (them) dancyh and group but
problem beguile such code in file mum < beguile > < have > nastepujący
index.php

<first code snippet>

Act I on and index.php? Street = wybor but now when it has administrative
district in table mums 3 begin entertain (play) ( base _ ) | city | street |
number | mysql rabelke kulumny and I have written such election

<second code snippet>

And great bamboozlement has left (has gone out) me because it groups after
cities me and beguile streets with numbers wyswietla domow but it beguile
from 30 cities in base narazie and now I it for so as fly 30 city robie
plikow stworzyc kazdego oodzielnie less or so wiecej index.php? Street =
wybor1 index.php? Street = wybor2 index.php? Street = wybor3 where inscribe
city apart bedzie kazde because I do not know (do not be able) to make this
file from link not know such me collect (take) poprostu jakiegos zeby e.g.
and group in (to) automatically = ' here ' city wstawial wstawial nazwe
pomozcie because on search for (after) time troche juz spędziłąm FAQ and
FORUMS and somewhere solution was definitely but so, I am green thank from
mountain (top) else


;-)


JW



Janwillem Borleffs

2004-12-26, 8:55 am

Harrie Verveer wrote:
> could you please try to reformulate your question into english?
>


Here's what http://www.poltran.com/ makes of it:

I greet! Begin entertain (play) php and mysql and mum < beguile > < have >
hope < stuff > that you will be helped to to joint with base from table me
data already know (be able) choose sort it (them) dancyh and group but
problem beguile such code in file mum < beguile > < have > nastepujący
index.php

<first code snippet>

Act I on and index.php? Street = wybor but now when it has administrative
district in table mums 3 begin entertain (play) ( base _ ) | city | street |
number | mysql rabelke kulumny and I have written such election

<second code snippet>

And great bamboozlement has left (has gone out) me because it groups after
cities me and beguile streets with numbers wyswietla domow but it beguile
from 30 cities in base narazie and now I it for so as fly 30 city robie
plikow stworzyc kazdego oodzielnie less or so wiecej index.php? Street =
wybor1 index.php? Street = wybor2 index.php? Street = wybor3 where inscribe
city apart bedzie kazde because I do not know (do not be able) to make this
file from link not know such me collect (take) poprostu jakiegos zeby e.g.
and group in (to) automatically = ' here ' city wstawial wstawial nazwe
pomozcie because on search for (after) time troche juz spędziłąm FAQ and
FORUMS and somewhere solution was definitely but so, I am green thank from
mountain (top) else


;-)


JW



Harrie Verveer

2004-12-26, 8:55 am

could you please try to reformulate your question into english?

NIUNIUŚ wrote:
> Witam !!!
>
> Zaczęłam się bawić php i mysql i mam nadzieję że mi pomożecie już umiem
> połączyć się z bazą dancyh wybrać dane z tabeli posortować je oraz
> pogrupować ale mam problem nastepujący
>
> w pliku index.php mam taki kod:
>
> <?
> $roz=".php";
> $id = $_REQUEST['ulica'];
> if (file_exists( $id.$roz ))
> {
> include( $id.$roz );
> }
> else
> {
> include( 'ulica'.$roz );
> }
> ?>
>
> no i działam sobie na index.php?ulica=wybor
>
> ale teraz kiedy zaczęłam się bawić mysql to mam rabelke
>
> ma 3 kulumny w tabeli(baza_powiat) | miasta | ulice | numery |
>
> no i napisałam sobie takie wybieranie
>
> wybor.php
>
> <?php
> $zapytanie = "SELECT * FROM baza_powiat WHERE Grupa='Krakow'";
> $wynik = mysql_query ($zapytanie) or die (" / zap - niepowodzenie");
> while($dane_z_tabeli=mysql_fetch_array($
wynik)){
> echo "
> <tr>
> <td align=\"left\" valign=\"top\">".$dane_z_tabeli['ulice']."</td>
> <td align=\"right\" valign=\"top\"><font
> color=\"#0000CC\"><b>".$dane_z_tabeli['numery']."</b></font></td>
> </tr>";
> }
> mysql_free_result($wynik);
> ?>
>
> no i fajny bajer mi wyszedł bo grupuje mi po miastach i wyswietla ulice
> z numerami domow
>
> no ale mam z 30 miast w bazie narazie i teraz tak jak ja robie to musze
> 30 plikow stworzyc dla kazdego miasta oodzielnie
>
> czyli mniej wiecej tak index.php?ulica=wybor1 index.php?ulica=wybor2
> index.php?ulica=wybor3 gdzie bedzie kazde miasto osobno wpisane
>
> bo poprostu nie umiem zrobić tego pliku nie wiem jakiegos takiego zeby
> mi pobierał z linka np i wstawial automatycznie w Grupa='tu wstawial'
> nazwe miasta
>
> pomozcie bo troche juz czasu spędziłąm na szukaniu po FAQ i FORACH i
> pewnie gdzieś było rozwiązanie ale zielona jestem jeszcze więc z góry
> dziękuje
>
> KASIA

Hilarion

2004-12-28, 3:56 pm

Szczerze mówiąc nie zrozumiałem o co chodzi.
Co chcesz osiągnąć?
Możliwość wypisania na stronie ulic i numerów dla zadanego miasta i / lub ulicy?
Nie bardzo rozumiem ideę wielu plików tylko po to, aby ... coś zrobić (nie
wiem co) z ulicami.

Hilarion

PS.: Piszesz na międzynarodową grupę. Tu zazwyczaj pisze się po angielsku.
PPS.: Używanie warunku WHERE to nie grupowanie, a tylko ograniczanie wyników
zapytania. Grupowanie (służące zazwyczaj do statystyk) osiąga się
klauzulą GROUP BY.


Janwillem Borleffs

2004-12-28, 3:56 pm

Harrie Verveer wrote:
> could you please try to reformulate your question into english?
>


Here's what http://www.poltran.com/ makes of it:

I greet! Begin entertain (play) php and mysql and mum < beguile > < have >
hope < stuff > that you will be helped to to joint with base from table me
data already know (be able) choose sort it (them) dancyh and group but
problem beguile such code in file mum < beguile > < have > nastepujący
index.php

<first code snippet>

Act I on and index.php? Street = wybor but now when it has administrative
district in table mums 3 begin entertain (play) ( base _ ) | city | street |
number | mysql rabelke kulumny and I have written such election

<second code snippet>

And great bamboozlement has left (has gone out) me because it groups after
cities me and beguile streets with numbers wyswietla domow but it beguile
from 30 cities in base narazie and now I it for so as fly 30 city robie
plikow stworzyc kazdego oodzielnie less or so wiecej index.php? Street =
wybor1 index.php? Street = wybor2 index.php? Street = wybor3 where inscribe
city apart bedzie kazde because I do not know (do not be able) to make this
file from link not know such me collect (take) poprostu jakiegos zeby e.g.
and group in (to) automatically = ' here ' city wstawial wstawial nazwe
pomozcie because on search for (after) time troche juz spędziłąm FAQ and
FORUMS and somewhere solution was definitely but so, I am green thank from
mountain (top) else


;-)


JW



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com