Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ilmaggy

    two values with one query

    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...
  2. ilmaggy

    excluding results in a query

    Thank you very much. It works fine now! I couldn't possibly solve it myself. Subqueries are new to me. So I've learned from it too.
  3. ilmaggy

    excluding results in a query

    Yes that's exactly what I mean. So only 1 picture per user.
  4. ilmaggy

    excluding results in a query

    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 =...
  5. ilmaggy

    excluding results in a query

    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...
  6. ilmaggy

    Find the Maximum of the sum of some fields.

    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...
  7. ilmaggy

    Header

    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...
  8. ilmaggy

    Header

    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...
  9. ilmaggy

    sending form input to a pop-up?

    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'...
  10. ilmaggy

    A form with two submit buttons?

    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...
  11. ilmaggy

    choosing a color from a pop-up

    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...

Part and Inventory Search

Back
Top