Hi there i have a tree structure navigation for a web site i am building, each page has an id, a parent_id and name. i am looking for a way given one name that i can get the tree to the root page.
a simple excample will help me explane better.
page table
id | parent_id | name
1...
Hi I am taking over a simple website database that has pages. Each page has a parent_id.
I have just looked at the database table and it has thousands of entrys. I looked into it a little and basically when a page was being deleted its children were not getting deleted.
I would like to clean...
Hi I would like to get the next and previous records when i am ordering alphabetically.
So i have the following
id name
1 john
2 simon
3 luke
I am on the record luke and i want to get the next one and the previous one in alphabetical order. So my sql query would give me back...
Hi i am getting a syntax error from this can anyone tell me where i am going wrong. Thanks in advance.
syntax error
var regexS = "[\\?&]"+name+"=([^&#]*)";
Hi I want to format the way I output search results by showing the string query inside <em></em> tags and cut it so shows this in the middle of 20 characters.
So if i have
$text = "this is the test text i have but i dont want to output it all so just want to output the important part of the...
Hi I am wondering if it is possible to output the objects used at the end of a page?
SO id somehwere i declared $newsObj = new news;
I could say print objects_used();
and it would print out
'news'
Also is there other debug functions that would let me see what files are were included or...
Is there a easy way to search on different fields for a entry of a text string.
So if i had one table product that had name, code, description and I had a search string 'something' would i have to do
select * from product where name = '%something%' OR code = '%something%' OR description =...
Hi I have a variable for content of a website i have and i want to break up the text into paragraphys in an array.
So I have
$content = '<p>text 1</p><p>text 2</p><p>text 3</p>';
and i want this
$contentArray = array(1=>'<p>text 1</p>', 2=> '<p>text 2</p>', 3=><p>text 3</p>);
I guess the...
Hi I am wanting to get one record from a table on the condition of two variables but there is a chance the two conditions will be met so i want to give one preference over the other, sorry that has not explaned it well.
Example to help.
I have a module table which has pages and parent/children...
Hi I have a table with peoples names in it like so.
table
name
--------
John Smith
Adam J Simpson
Simon
Alex 3rd of kingdom 2 Smith
I want to select all the rows where the last word starts with 'S' i.e. an alphabet search on the last name.
I was trying to use somthing like
WHERE name REGEXP...
Hi I have a content table with text in it and i want to order the query by the first letter of the content. Problem is there are some html tags in the content.
Is there a way I can ignore the html tags?
thanks
Hi I am sure this is a common thing and got a simple answer but its friday and i am clearly not got the brain power for it today.
I am wanting to do a alphabet search on a table but exclude the starting 'the ';
so say i have entrys like this.
name
'the world'
'transworld'
So I have this...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.