Jump to content
php.lv forumi

jaut. par OOP php un mysql ...


blondine

Recommended Posts

tatad fīča ir tāda, catalog.class.php - tiek apstrādāti dati no db izmantojot:

 

while($row = mysql_fetch_assoc($this->sql_res))

 

viss itkā strādā, bet tad meginaju pieslegties paging.class.php failam, kur atrodas class pager mainigie, funkcijas utt.

Ir nepieciesams izaukt funkciju, bet neizdodas ideja varetu but tada..

 

 

$pager = new pager($sql,'page',5);

while($row = mysql_fetch_array($pager->sql_res))..

 

ceru, ka doma ir saprotama!

Edited by blondine
Link to comment
Share on other sites

un kas tieši "neizdodas"?

 

varbūt tai paging klasei nāk līdzi kkādi komentāri/dokumentācija/piemēri, kur ir aprakstīts, kā tā ir jālieto?

 

otrais fragmenta paraugs izpildas un darbojas - izvelk no db datus un sagrupe tos pa lpp, ja to palaiz vienaa un taja pasaa klasee paging.class noradot sintaksi while($row = mysql_fetch_array($pager->sql_res)), ... bet lidz ko to pasu gribu realizeet catalog.class failaa nesaprot mysql_fetch_array - pager() funkciju un darbojas tikai ar $this-> mainigo kjipa error (mysql_fetch_assoc(): supplied argument is not a valid MySQL)... nu kaut kaa taa.. izloznajos pa visu forumu un isti tadu risinajumu neatradu

 

nu princips acimredzot ir tads , caur funkciju mysql_fetch_array vadzetu izsaukt pager() - aizvietojot $this->...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...