[PHP] SQL Join query

2004-08-07 Thread Mattias Jönsson
I have a problem with my mysql query SELECT pics.*, pic_comments.*, count(*) AS num_comments FROM pics, pic_comments WHERE pics.category = 1 AND pics.id = pic_comments.pic_id GROUP BY pic_comments.pic_id; pics table: | id | submitter | time | date | category | pic_comments table: | pic_id | comm

Re: [PHP] is there a more efficient query?

2004-08-07 Thread Mattias Jönsson
Well i havent seen anyone been using BETWEEN. Anyway... $SQL = mysql_query("SELECT value FROM table_name WHERE element BETWEEN 48 AND 53"); while($row = mysql_fetch_arrray($SQL)) { print($row['value']); } mysql_free_result($SQL); ?> From: "Jason Davidson" <[EMAIL PROTECTED]> To: "Brian Tully"

[PHP] choosing another smtpserver with PHPs mail function

2004-06-10 Thread Mattias Jönsson
Hello everybody :). I having a little problem with PHPs build in function mail(). The mailserver isnt located on the webserver, its on another machine. I have tryed ini_set("SMTP", "ipaddress"); with no result. The system I'm on runs on an Linux box. Can this be done or must I write an own mail fun

[PHP] Problem when scaling Jpeg images with libgd

2004-05-20 Thread Mattias Jönsson
Hello, I have a problem when im trying to scale an jpeg image with libgd my function lookes like this: function image_resize_jpeg( $img, $w) { $image = imagecreatefromjpeg($img); $img_info = getimagesize ($img); $orig_height = $img_info[1]; //source hieght from $img_info $orig_width = $img_