[PHP-DB] Re: MySQL query from multiple tables

2002-06-29 Thread andy
hello Matthew: if I understood your problem right, you have to join the two tables. E.g: SELECT ph.*, pf.prod_ID, pf.feat_ID, pf.feat_value FROM product_head ph, product_features pf WHERE ph.prod_cat_ID = 1 AND ph.prod_cat_ID = pf.prod_cat_ID /*join the two

[PHP-DB] Re: [PHP] saving temporary image to database

2002-06-29 Thread Rasmus Lerdorf
There is no imagejpeg() call in the code snippet you provided. And you don't say how it is failing. You haven't provided us with enough data to answer this question. -Rasmus On Sat, 29 Jun 2002, andy wrote: Hi there, I would like to save a jpg into a blob field of mysql. The function

[PHP-DB] Re: [PHP] saving temporary image to database

2002-06-29 Thread andy
... sorry I thought it would be to much code. Here is the complete code : $inputImg = ImageCreateFromJPEG($picture_location); # old size $srcX = imagesx($inputImg); $srcY = imagesy($inputImg); # new size $ratio = ($srcY / $dstY); $dstX = ($srcX / $ratio); $outputImg =

[PHP-DB] AVG fucntion help

2002-06-29 Thread CrossWalkCentral
Using PHP I need some help running and AVG qery the syntax is as follows $results=sql_query(Select AVG(rate) from MYTABLENAME where id=$id,$dbi) This works but I am not sure how to get is value into a variable. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Excel to MySQL??

2002-06-29 Thread Chase
Does anyone know of a way that I can export an Excel spreadsheet to a file that I can import to MySQL? I found a program that will do this for Access, but I would rather leave Access out of this if possible. Thanks!! Chase -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP-DB] Excel to MySQL??

2002-06-29 Thread Peter Lovatt
Hi from Excel export to csv use phpMyAdmin to load it into mysql (recent versions of phpMyAdmin has an Excel import function) HTH Peter --- Excellence in internet and open source software --- Sunmaia

RE: [PHP-DB] Excel to MySQL??

2002-06-29 Thread Jen Swofford
Or if you don't use phpMyAdmin you can use LOAD DATA INFILE once you have saved the Excel doc as a .csv file: http://www.mysql.com/doc/L/O/LOAD_DATA.html Jen Swofford [EMAIL PROTECTED] -Original Message- From: Peter Lovatt [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 29, 2002

Re: [PHP-DB] Excel to MySQL??

2002-06-29 Thread Paul DuBois
At 15:21 -0600 6/29/02, Chase wrote: Does anyone know of a way that I can export an Excel spreadsheet to a file that I can import to MySQL? I found a program that will do this for Access, but I would rather leave Access out of this if possible. Thanks!! Chase Does it have to be written in

[PHP-DB] NEW help finding sum or average

2002-06-29 Thread CrossWalkCentral
I have a table called TEST , it cotains 3 fileds A B C I can have several rows where A is the same value. I need help with PHP I need to obtain the AVERAGE of B where A=1 Can some one help me on this? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Excel to MySQL??

2002-06-29 Thread Chase
My webhost is running phpMyAdmin v2.2.2 and it is giving me errors when I try to load the file. Are there any certain characters that cannot be in the file? (ie. $) Chase Peter Lovatt wrote: Hi from Excel export to csv use phpMyAdmin to load it into mysql (recent versions of

[PHP-DB] Usiing FOREACH to loop through Array

2002-06-29 Thread Brad Melendy
Hi All, I've stumped myself here. In a nutshell, I have a function that returns my array based on a SQL query and here's the code: -begin code--- function getCourses($UID) { global $link; $result = mysql_query( SELECT C.CourseName FROM tblcourses C, tblusers U,

[PHP-DB] Traversing an array usng for loops?

2002-06-29 Thread Matthew Nock
I have a query which returns a number of product details. there may be one or more rows for each product category for example: prod_ID feature_ID feature_cat_ID feature_value . 1 2 1 10 1 1 2

[PHP-DB] Re: Excel to MySQL??

2002-06-29 Thread Manuel Lemos
Hello, On 06/29/2002 06:21 PM, Chase wrote: Does anyone know of a way that I can export an Excel spreadsheet to a file that I can import to MySQL? I found a program that will do this for Access, but I would rather leave Access out of this if possible. I think you can do it via ODBC under

[PHP-DB] 405 Error with Apache 1.3.20/PHP 4.2.1

2002-06-29 Thread Tim Legg
Good Afternoon Everyone, I have PHP 4.2.1 installed and have my phpinfo(); available for you at: http://pc047113.stuorg.iastate.edu/phpinfo.php And have Apache 1.3.20 installed and its httpd.conf is available at: http://www.public.iastate.edu/~legg/freebsd/httpd.txt I was

[PHP-DB] Re: [PHP] Usiing FOREACH to loop through Array

2002-06-29 Thread Steve Edberg
At 3:27 PM -0700 6/29/02, Brad Melendy wrote: Hi All, I've stumped myself here. In a nutshell, I have a function that returns my array based on a SQL query and here's the code: -begin code--- function getCourses($UID) { global $link; $result = mysql_query(

[PHP-DB] Re: [PHP] Usiing FOREACH to loop through Array

2002-06-29 Thread Steve Edberg
Oops! It's hot, it's Saturday, brain not functioning at 100%, made cut'n'paste error: SNIP or (2) set a flag in getCourses() so that the query is only executed once, otherwise returning a result line - something like: function getCourses($UID) global $link; static $result =

[PHP-DB] mail function

2002-06-29 Thread CrossWalkCentral
When using this fucntion listed bellow with the HTML headder the email sent does not show the FROM in the FORM filed it just displays it in the email message Any one have any ideas. $headers .= From: CrossWalkCentral [EMAIL PROTECTED] \n; -- PHP Database Mailing List

[PHP-DB] Re: [PHP] Usiing FOREACH to loop through Array

2002-06-29 Thread Brad Melendy
Steve, Thanks very much. This make total sense to me. Now, I was pretty sure that I was getting an array back from mysql_fetch_array because when I do a 'print $myCourses' without specifying any value, I just get 'array' which I believe I am supposed to, IF it is truly an array. Anyway, I'm

[PHP-DB] Re: [PHP] Usiing FOREACH to loop through Array

2002-06-29 Thread Brad Melendy
Steve, Thanks a ton! I'm now running slick as a whistle using your option #1 (looping through the results in the function) and using the newer mysql_fetch_assoc() function. I have a much better understanding of this now and I really appreciate your help. Hopefully I'll get a chance to help