Check a page is in a certain menu (menu in array?)

Stefek

Cool,

you could use WBs own Class database "get_one" Methode to short your code:



$menunum= $database->get_one('SELECT menu FROM '.TABLE_PREFIX.'pages WHERE page_id = \''.PAGE_ID.'\'');



Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Indextra

Thank you!

If someone is wondering I used the following code:
<?php
$menunum 
false;
$rslt mysql_query('SELECT menu FROM '.TABLE_PREFIX.'pages WHERE page_id = \''.PAGE_ID.'\'');
if(
mysql_num_rows($rslt)>0){
while($row mysql_fetch_array($rslt)){
$menunum $row['menu'] ;
}
}
?>

Stefek

Hello,

I don't know what the exact purpose of this is..
but you could create your own function selecting the pages directly from the database.

Just look at the table TABLE_PREFIX.'pages in the database.

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Indextra

Hello,

I have 2 menu's on my site. Is there a possibilty to check that a certain page is in a certain menu? This could very easily be done if the menu could be loaded in an array. However this is not possible, as far as I know.
Has someone an idea?

Greets,
Remi