Re: [PHP-DB] DB-stored images

2002-11-26 Thread Joakim Andersson
Ohlson Stefan wrote: Hi! I have a db where we stores images in the database but I haven't figured out how I display that image after I've selected it from the table. I've tried with IMG SRC='$data' and IMG SRC=$data but $data just return the Select-query: htmlheadtitle/title/head body

RE: [PHP-DB] How to Check Directory exist in Specific Folder

2002-11-19 Thread Joakim Andersson
Dear all Does php have any script which can check if a directory exist in specific folder? Thx a lot Jack if (is_dir (/path/to/your/folder) ) echo Dir exists; else echo Dir doesn't exist; Regards Joakim - This message

RE: [PHP-DB] MySql security

2002-11-19 Thread Joakim Andersson
Hi, Since i dont know any mysql group, i will try here - it is anyway related to php. When i want to make php/mysql application i have mysql on the server and i connect to it with mysql_pconnect(localhost,root,) and it works. I assume that any user or hacker could connect to mysql

SV: [PHP-DB] Find out a pic size?

2002-11-11 Thread joakim . andersson
-Ursprungligt meddelande- Från: Snijders, Mark [mailto:Mark.Snijders;atosorigin.com] Skickat: måndag den 11 november 2002 09:03 Till: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Ämne: RE: [PHP-DB] Find out a pic size? check this out: http://www.php.net/manual/en/ref.image.php

SV: [PHP-DB] Find out a pic size?

2002-11-10 Thread joakim . andersson
Hi, I'm working with a lot of picture in a website and the size is not always the same. I need some help on how to find out the size (width and height) of a picture. Is there any way to do this (especially with PHP)? I need it so I can calculate the width and height to be

RE: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
$sql = select quarter($qdate) or die(not work #3); change to $sql = select quarter($qdate) as my_quarter; //Added an alias to quarter($qdate). Easier to access that way... And there's no need for an 'or die()' here. You're just assigning a variable and most likely this will allways work! $yyy

RE: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
printf(tda href=\%s?id=%sdelete=yes\Delete/a/td, $PHP_SELF, $myrow[id]); printf(tda href=\%s?id=%ssubmit=yes\Update/tdtd%s/tdtd %s/tdtd %s/td/a/tr, update-inv.php, $myrow[id], $myrow[name], $myrow[details], $yyy); My bad. Before this printf statement you need $my_var =

RE: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
On Monday 04 November 2002 19:58, [EMAIL PROTECTED] wrote: $sql = select quarter($qdate) or die(not work #3); change to $sql = select quarter($qdate) as my_quarter; //Added an alias to quarter($qdate). Easier to access that way... And there's no need for an 'or die()' here. You're

RE: [PHP-DB] group by day (unix timestamp provided)

2002-10-25 Thread joakim . andersson
How can I get mySQL to group stuff by the day? my date coloumn is a UNIX timestamp. SELECT whatever FROM my_table GROUP BY FROM_UNIXTIME(timestamp_col, '%Y-%m-%d') Regards Joakim -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] From address in mail() header not working - ideas?

2002-10-25 Thread joakim . andersson
Hi Guys, I did try that but I will try it again. Also, I have echo'd the data and it does appear as I expect. Any other thoughts while I try this? Don't know if this has anything to do with your problem, but $headers = Return-Path: $support_email\r\n; should be $headers .=

RE: [PHP-DB] Broken Links 2

2002-10-24 Thread joakim . andersson
Hi, I think you need to remove echo $src_img; from your non working code as this is not what you want to do. And do you have support for GIF compiled in? Regards Joakim -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Variable won't be passed from HTTP address bar

2002-10-24 Thread joakim . andersson
Try instead: if( $_POST['action'] ==test ){ echo Test;} HTH Ignatius This should really be if( $_GET['action'] ==test ){ echo Test;} since it's a get-request we're dealing with... Regards Joakim -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP-DB] It counts everything not a specific day..

2002-10-24 Thread joakim . andersson
OK, Looks like there are two options I can either convert the unix timestamp colomn to a mysql time one *OR* someone can tell me how to use unix timestamps in this query... Try something like this: SELECT CONCAT(extract(year FROM FROM_UNIXTIME(time)), extract(month FROM

RE: [PHP-DB] DB Print Columns and Rows

2002-10-24 Thread joakim . andersson
Hello PHP people. I was wondering if I could get a question answered? How would I print a Database Table into a table when the DB Table has 4 columns, AND 4 rows. See I only know how to print one column. ?php // Your dB-stuff here... $separator = ; echo

RE: [PHP-DB] Help MySQL server has gone away

2002-10-01 Thread joakim . andersson
I do not think php is the problem here. Take a look here http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Gone _away There are some good pointers on what to do... Regards Joakim -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP-DB] INSERTing INTO Multiple Tables with MySQL PHP

2002-09-10 Thread joakim . andersson
VALUES ($insert_id, $max_second_id + 1); $result = mysql_query($sql); ? Might be some errors in it, but you get the idea. Regards Joakim Andersson -Original Message- From: Graeme McLaren [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 5:42 PM To: [EMAIL PROTECTED

RE: [PHP-DB] next prev links for search result

2002-08-27 Thread joakim . andersson
'%$search_string%' and let your MySQL-server do the counting. No need to transfer all data to PHP just to count the rows. You still have to run two queries, but I don't think you need to worry too much about performance issues, unless you have a really, really huge table. Regards Joakim Andersson

RE: [PHP-DB] Problem with retrieving Data with MySQL

2002-07-19 Thread joakim . andersson
to know if you have made this function and if so we probably need to see the function aswell. Regards Joakim Andersson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Select a subset?

2002-07-17 Thread joakim . andersson
From: Clive Bruton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 10:24 PM Joakim, thanks, that sorted it. Just one note, numrows in the sql query should be num_rows? That's how I got it to work anyway. Yes, that's totally correct. Just a typo. Joakim -- PHP Database Mailing

RE: [PHP-DB] Select a subset?

2002-07-16 Thread joakim . andersson
$rows_to_list ?/a This oughta do it... Regards Joakim Andersson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] escaping line brakes

2002-07-16 Thread joakim . andersson
the data for output to the form, then just don't use nl2br(). Regards Joakim Andersson Thanx for any help, Andy -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Date comparison problem

2002-07-11 Thread joakim . andersson
mytable WHERE LEFT(my_datetime, 10) = ' . substr($form_date, 3, 2) . . substr($form_date, 0, 2) . . substr($form_date, 6, 4) . '; Regards Joakim Andersson -Original Message- From: Gabor Niederlaender [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 8:36 AM To: [EMAIL

RE: [PHP-DB] Re: Getting Percentage of coloumn value

2002-07-10 Thread joakim . andersson
?php do_html_footer(); ? Regards Joakim Andersson -Original Message- From: JJ Harrison [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 8:30 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Getting Percentage of coloumn value Here is my script: ? include includes

RE: [PHP-DB] php problem passing variables

2002-07-10 Thread joakim . andersson
This doesn't look like a database question to me... Anyway, try $_POST['variable_name'] if the variable comes from a form with the POST-method $_GET['variable_name'] - Form using GET-method or passing variables in the URI (mypage.php?variable_name=42) Regards Joakim Andersson -Original

RE: [PHP-DB] MSSQL_connect() won't work

2002-07-09 Thread joakim . andersson
Does the user 'gn' exist? Are you using the correct password? Does that user have permissions on the database? Hint: Login failed for user 'gn' suggests that there is something wrong with that account... Regards Joakim Andersson -Original Message- From: Gabor Niederlaender [mailto