Hi all,
I want to get two values with one query:
the country_name that belongs to country_id_1 and,
the country_name that belongs to country_id_2.
I used this query:
(SELECT name FROM countries WHERE country_id = '1')
UNION
(SELECT name FROM countries WHERE country_id = '2')
But it didn't...
Unfortunately it didn't work. Still I can see more than one picture of an user in my top10.
This is my exact query:
SELECT user.id AS id, naam, foto.fid AS fid, foto, votes.vote_to_user_id, foto_id, sum( rating ) AS punten FROM votes, foto, user WHERE votes.foto_id = foto.fid AND user.id =...
Hi,
I've got a query like this:
SELECT user.*, foto.*, votes.sum(rating) FROM votes WHERE votes.foto_id = foto.fid AND user.id = votes.vote_to_user_id GROUP BY votes.foto_id ORDER BY sum(rating) DESC LIMIT 0 , 10
This query selects photos with the highest sum of votes.
Now I want to exclude...
Hi,
I want to select the biggest result which I get by adding the fields named "vote" with the same user_id.
I thought of the following (but it didn't work out, unfortunately):
SELECT max(sum(rating)) FROM votes WHERE user_id = $user_id
Could anyone help me with this?
Thanking you in advance...
The image is not coming from a db. The script makes the image itself:
<?php
header('Content type: image/jpeg');
$background = imagecreatefromjpeg("background.jpg");
imagettftext($background,19,0,83,160,$color,$font,$text);
imagejpeg($background);
imagedestroy($background);
?>
Now I want to...
Hi,
I want the script to output a jpeg image. But after that I want a html form as output. First I use header('Content type: image/jpeg');
If I use header('content type: text/html'); in the same script it says:
Warning: Cannot add header information - headers already sent by ....
could anyone...
Hi,
I have a form and with a button I open a pop-up. I want to show the values of the form in this pop-up. I think this is possible in Javascript.
My code:
<input type="button" name="preview" value="Preview" onclick="MM_openBrWindow('popup.php'...
Hi,
I made a form and I want two submit buttons. Both linking to the same handler or if possible to different handlers.
One submit has to open the handler in a pop-up the other one just in the same window (so that the mother page redirects, as in a normal form).
I thought this must be possible...
Hi,
I made a pop-up with a colour palette in which users can select a color. The color code is then 'sent' back to the main page in a text field of a form.
This is the script I used:
the pop-up:
function r(hval)
{
opener.document.formname.fieldname.value=hval;
self.close();
}
the...
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.