Hi
Simple answer is to use $_REQUEST['id']:
$sql = "select a.ID,c.content from article as a inner join comment as c on a.ID = c.articleID
group by a.ID,c.content order by a.ID desc limit 5 where a.ID = " . $_REQUEST['id'];
However, there are few things that need to be tweaked from a syntax...
Hi
I had mysql replication working fine for awhile until the binary logs used up all the disk space (my bad for not putting anything in place) and all our websites stop working. As a quick fix I deleted one of the first binary logs that where created but left the current binary file that was...
I've been creating my own spider.
So you enter in a url and it creates a sitemap of that site.
It's all working fine, but this is one little issue that keeps arrising as it causes dupilcates in the sitemap.
Further to that explination
If I wanted to compare two urls:
1. http://domainname.com/folder/
and
2. http://domainname.com/folder/index.htm
Although they are exactly the same page, the strings would be different.
I could just strip off the index.htm from the 2nd url and it would work but it...
Hi
I was wondering if there was a way to resolve a url.
E.g. http://domainname.com/folder/
By default the server will return some sort of index page but that filename isn't needed to be entered for the page to load in a browser.
Is there a way in php to find out the name of the page that is...
Agreed that would normally do the job, except in this case I wont be able to use a global variable.
The script that I'm using is a slideshow script. The script will work fine, with global variables, as long as there is only one slideshow on the screen at a time. I'm planning on using a few...
Hi
I'm trying to use the setInterval function. I seem to be having trouble passing an array through to the function.
Lets say my array is
var my_array = Array("red", "green", "blue");
if I use the following:
setInterval("my_function(my_array)", 50)
It errors saying "my_array is undefined"
If...
A nice tricky one for you all.
I'm trying to figure out all the possible word combinations for a phrase.
E.g. "norman2 stuck on php"
I know the number of combinations as it is a factorial calculation (4 x 3 x 2 x 1)
What I need is to put that into a loop spitting out all the variations...
I am running a script each month that scores a webpage out of 30.
After each month I want to be able to display the current results compared with last months results. I have this currently working at the moment by running a query on this months, and then another individual query for each row in...
Perfect thank you TonyGroves!
I agree, I should really create a sperate table containing the activity id and the category id. I am always curious when I come across a new problem to see if there is an answer to it cause you never know when it might come in handy.
Thank you all for your help.
Thats exactly what I'm after, but it just didn't bring up the data it should have.
The data in columnb = "Sport Activities"
the data in columna = "Lesuire Activities,Sport Activities"
So where columnb matches the string in columna join that row.
I'm listing activities. Each activity has a 1...
I've come across a problem that I haven't faced before and was wondering if it can be done.
Basicly the SQL goes like this:
SELECT.... FROM [tablea] INNER JOIN [tableb] ON [tablea].[column] LIKE [tableb].[column]
[tablea].[column] = "example"
[tableb].[column] = "example, example2"
So I...
Hi
I am entering a url in php to capture the html code on that page.
This is working fine.
However, on some sites there is a redirect in place which returns a different page. How do I capture the full URL of the page that I was redirected to?
E.g. I entered "http://www.mypage.com" but the...
I created another solution to fix the problem.
I just created a div tag just below the text box and ran the following code:
<script>
function DisplayFilename(filename, objFilename) {
obj = document.getElementById(objFilename);
var x = 0;
var len = 0;
x = filename.indexOf("\\")...
Normally I wouldn't worry about it but a Client requested if it could be done so I thought I would try and find out.
It's a look and feel thing as to why the size of the input box has to be small.
Hi
When uploading a file using <input type="file"> it brings up a textbox and a browse button.
Once you have browsed your computer and found the file you are looking for it then enters the path into the textbox.
When the path is inserted into the textbox it shows the text at the start of the...
Thanks for your help tsuji but that didn't work either.
I managed to come up with an alternative solution though
I placed the function in a timer.
<script type='text/javascript'>
setTimeout(ShowField('Field Name'), 100);
</script>
Works just how I wanted it to :)
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.