[PHP-DB] storing image in a BLOB

2002-11-20 Thread Myrage
how do i save a whole image in a BLOB ?? any ways to change the BLOB when editing Regards Myrage -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] storing image in a BLOB

2002-11-20 Thread David Russell
Database? PHP Version? Server? David Russell IT Support Manager Barloworld Optimus (Pty) Ltd Tel: +2711 444-7250 Fax: +2711 444-7256 e-mail: [EMAIL PROTECTED] web: www.BarloworldOptimus.com -Original Message- From: Myrage [mailto:[EMAIL PROTECTED]] Sent: 20 November 2002 12:22 PM To:

[PHP-DB] using php4 to connect to mysql (newbie question)

2002-11-20 Thread mike karthauser
hi, I'm new to php and mysql and are trying to find some tutorials that i can work through so i can get my head round connecting php4 to mysql. I have been looking in all the usual places but keep finding php3 examples and also examples using globals on.. The one i have been looking at is

RE: [PHP-DB] using php4 to connect to mysql (newbie question)

2002-11-20 Thread Snijders, Mark
read this http://www.php.net/manual/en/ref.mysql.php and other stuff on http://www.php.net good lukck ___ Mark Snijders, Developer Atos Origin Groenewoudeseweg 1, Room VN-515 5621 BA Eindhoven, The Netherlands * : [EMAIL PROTECTED] *:+31 (0)40 -

RE: [PHP-DB] using php4 to connect to mysql (newbie question)

2002-11-20 Thread Steve Dodkins
Hi The latest PHP bible is now updated to 4.2 www.troutworks.com -Original Message- From: Snijders, Mark [mailto:[EMAIL PROTECTED]] Sent: 20 November 2002 12:18 To: 'mike karthauser'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] using php4 to connect to mysql (newbie question) read this

RE: [PHP-DB] using php4 to connect to mysql (newbie question)

2002-11-20 Thread Snijders, Mark
on www.php.net is the same info and more and it's free :-) ___ Mark Snijders, Developer Atos Origin Groenewoudeseweg 1, Room VN-515 5621 BA Eindhoven, The Netherlands * : [EMAIL PROTECTED] *:+31 (0)40 - 2785992 (tel) * : +31 (0)40 - 2788729 (fax) The

[PHP-DB] Storing picture into Sybse DB

2002-11-20 Thread midheart
Hello, all: I have one probelm about inserting picture into the image field in sybase db. Now, I could insert 15K picture into Sybase db, but just only 15K size. I have no idea how to make the size larger, at least expand it to be 60K. Does anyone have this experience? Does the image field in

[PHP-DB] Storing picture into DB

2002-11-20 Thread midheart
Hey, All: Does you have experience storing picture into DataBase? (experience about Sybase is better.) I have one question that what field in DB is suitable for storing picture/image. If the PHP call function, for example sybase_query(), I think that it has some bug, then

Re: [PHP-DB] Storing picture into DB

2002-11-20 Thread Cornelia Boenigk
Hi I do not have any experience with Sybase;-( If there is a field type available to store strings of unlimited length (or at least strings of your desired 60K) you could use the PHP functions base64_encode() to encode your image data and then store it as string in your table. If you retrieve it

[PHP-DB] Client API version is wrong or am I?

2002-11-20 Thread Jacob Larsen
I have installed the MySQL 4.0.4 client, but when I look at phpinfo() I see that it says: Client API version: 4.0.2-alpha Why? Regards, Jacob -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] substituting for $id with globals off (newbie)

2002-11-20 Thread mike karthauser
Hi, thanks for earlier replies regarding php resources. I am currently hitting a brick wall on the script below due to my lack of understanding of php coupled with my lack of knowledge about globals. I replaced $id with $_GET['id'] in line 5 which now allows the user to reach the script to

RE: [PHP-DB] substituting for $id with globals off (newbie)

2002-11-20 Thread Davy Obdam
-Oorspronkelijk bericht- Van: Davy Obdam [mailto:[EMAIL PROTECTED]] Verzonden: woensdag 20 november 2002 17:39 Aan: 'mike karthauser' Onderwerp: RE: [PHP-DB] substituting for $id with globals off (newbie) Hi Mike, $result = mysql_query(SELECT * FROM address WHERE

[PHP-DB] multiple foreach loop?

2002-11-20 Thread Aaron Wolski
Hi All, Trying to create a refer a friend script. User enters 10 names and email address of a friend to refer to a site. The following code SORT of works in that it will send the email, etc.. but problem is it duplicates - sends the email out twice to the same email address. **CODE***

[PHP-DB] INSERT question...

2002-11-20 Thread NIPP, SCOTT V (SBCSI)
I have an INSERT statement that I cannot quiet get working. The table that this data is being put into has 7 columns, but I only care about putting in the data from the first two columns at this time. The first column is an array element, and the second column needs to be a timestamp.

RE: [PHP-DB] INSERT question...

2002-11-20 Thread Aaron Wolski
Try... $query = INSERT INTO accounts (accnts,timestamp) VALUES(''.$accnts[0].'','TIMESTAMP(10)'); Might work? Aaron -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: November 20, 2002 2:16 PM To: '[EMAIL PROTECTED]' Subject: [PHP-DB] INSERT question...

Re: [PHP-DB] multiple foreach loop?

2002-11-20 Thread Ryan Gallagher
Quoting Aaron Wolski [EMAIL PROTECTED]: Hi All, Trying to create a refer a friend script. User enters 10 names and email address of a friend to refer to a site. The following code SORT of works in that it will send the email, etc.. but problem is it duplicates - sends the email out

Re: [PHP-DB] INSERT question...

2002-11-20 Thread 1LT John W. Holmes
Try... $query = INSERT INTO accounts (accnts,timestamp) VALUES(''.$accnts[0].'','TIMESTAMP(10)'); Might work? Aaron For the OP, you don't really want to insert the text TIMESTAMP(10) into a column, do you? If you want the current 10-digit timestamp, then you can just use NOW() or

RE: [PHP-DB] INSERT question...

2002-11-20 Thread Aaron Wolski
Hmm You learn something new everyday :) Aaron -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: November 20, 2002 2:27 PM To: Aaron Wolski; 'NIPP, SCOTT V (SBCSI)'; [EMAIL PROTECTED] Subject: Re: [PHP-DB] INSERT question... Try... $query = INSERT INTO

Re: [PHP-DB] INSERT question...

2002-11-20 Thread Ryan Gallagher
Quoting NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]: I have an INSERT statement that I cannot quiet get working. The table that this data is being put into has 7 columns, but I only care about putting in the data from the first two columns at this time. The first column is an array

RE: [PHP-DB] multiple foreach loop?

2002-11-20 Thread Ryan Gallagher
Quoting Aaron Wolski [EMAIL PROTECTED]: Hi, Ok I understand your code... How about I error check to ensure that if any of the name/email pairs don't have a value to discount their entry? For example... If the user enters: Aaron [EMAIL PROTECTED] Rob blank Bob [EMAIL

RE: [PHP-DB] INSERT question...

2002-11-20 Thread NIPP, SCOTT V (SBCSI)
OK. This sounds great, but now I am getting a completely different error message. You have an error in your SQL syntax near '-sys) VALUES('sn4265-turner')' at line 1 Here is the INSERT statement: $query = INSERT INTO accounts (id-sys) VALUES('.$accnts[0].'); Do I have

Re: [PHP-DB] INSERT question...

2002-11-20 Thread 1LT John W. Holmes
OK. This sounds great, but now I am getting a completely different error message. You have an error in your SQL syntax near '-sys) VALUES('sn4265-turner')' at line 1 Here is the INSERT statement: $query = INSERT INTO accounts (id-sys) VALUES('.$accnts[0].'); Do I have to rename the

Re: [PHP-DB] INSERT question...

2002-11-20 Thread Ryan Gallagher
Quoting 1LT John W. Holmes [EMAIL PROTECTED]: OK. This sounds great, but now I am getting a completely different error message. You have an error in your SQL syntax near '-sys) VALUES('sn4265-turner')' at line 1 Here is the INSERT statement: $query = INSERT INTO accounts

RE: [PHP-DB] INSERT question...

2002-11-20 Thread NIPP, SCOTT V (SBCSI)
Great. That is perfect. The last minor issue is that the timestamp is a datetime column, and needs to be such since I don't want this to change when the record is updated. This is correct, right? If the column were a timestamp data type, the value would change every time the record is

Re: [PHP-DB] INSERT question...

2002-11-20 Thread 1LT John W. Holmes
$query = INSERT INTO accounts (`id-sys`, rtime) VALUES('.$accnts[0].', 'NOW()'); Remove the quotes around NOW(). It's a function, not a string. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] INSERT question...

2002-11-20 Thread NIPP, SCOTT V (SBCSI)
Thanks a bunch. That fixed me right up. Still learning a lot about PHP and MySQL. Hopefully I will be able to remember this as I am sure this issue will come up for me again in the future. -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday,

[PHP-DB] Access Violation in ISAPI version

2002-11-20 Thread Ryan Jameson (USA)
Has anyone else had problems with the error PHP has encountered an Access Violation at 098029AE ... It's talked about at: http://bugs.php.net/bug.php?id=15333 The most frustrating thing is our ISP went above the call of duty to install PHP for me, and now his response is... well read for

[PHP-DB] General How-to Question...

2002-11-20 Thread NIPP, SCOTT V (SBCSI)
Once again I am posting a bit off topic, so tell me to go away if this is bugging people... Thanks for all of the assistance so far in creating what will be a completely automated user account request system. I am now trying to figure out the mechanics of the account approval

[PHP-DB] help w/Multiple Joins

2002-11-20 Thread Michael Baerwolf
Hello, I'm trying to put together a little photo album section for a website. I have this query which returns the expected info from the command line. SELECT * FROM photo_album as p INNER JOIN images AS i1 ON p.img_1=i1.img_id INNER JOIN images AS i2 ON p.img_2=i2.img_id INNER JOIN images AS i3

RE: [PHP-DB] $_get 2 variables

2002-11-20 Thread Gavin Amm
Thanks Ryan, Ignatius. -Original Message- From: Ryan Gallagher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 20 November 2002 5:37 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] $_get 2 variables Quoting Gavin Amm [EMAIL PROTECTED]: Hi, I'm wanting to retrieve data from my database

[PHP-DB] Select Last row

2002-11-20 Thread Afif
dear All, I have data and I want to get the last row of my table. how to select the last row, with the id is timestamp? and the the result will display in the prompt? sorry if my question is sound stupid, but I really confuse how to start this code -- Warm regards, Afif mailto:[EMAIL

Re: [PHP-DB] Select Last row

2002-11-20 Thread Marco Tabini
Can you reverse your sorting order? In that case, the last row now becomes the first--making things much easier and faster! :-) Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at

[PHP-DB] Check data exists in MySQL

2002-11-20 Thread Gavin Amm
Hi, I'd like to test to see if data exists in my table (count), and if not insert some: This is seudo code of what I'd like: $sql = SELECT num FROM count WHERE col1=$var1 AND col2=$var2; IF $sql returns an EMPTY SET { INSERT INTO count VALUES('$var1', '$var2', 0); } This is the code i have

RE: [PHP-DB] Email Encryption?

2002-11-20 Thread Gavin Amm
ok, here's an idea: Either use a script off the web, or write your own: During the initial SSL session setup: - send an e-mail to the client with a web page attached. (include instructions in the e-mail) Put javascript into the page to decrypt RC5 (apparently you can get a patch for MySQL

Re: [PHP-DB] Check data exists in MySQL

2002-11-20 Thread Tatang Widyanto
if (!$page_count){ $sql = INSERT INTO count VALUES('$var1', '$var2', '0'); } if (!mysql_num_rows($page_count)){ $sql = INSERT INTO count VALUES('$var1', '$var2', '0'); } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] FW: Selecting not on DB

2002-11-20 Thread milisphp
Hi there, I have a problem that I cannot seem to solve. I'm using MySql and query it using PHP. I have create table ABC with field called number containing (1,4,6,10) How is to select all number form 1 to 10 which are not in that field so the output somehow like this : ++ | Number

RE: [PHP-DB] Check data exists in MySQL

2002-11-20 Thread Gavin Amm
Hi, for some reason i'm getting an error when I try to run this query: __ $sql=SELECT num FROM count where dept='$dept' AND deptsub='$deptsub'; $page_count = mysql_query($sql,$db); # If does not exist in the database, insert a new entry if

Re: [PHP-DB] Check data exists in MySQL

2002-11-20 Thread Tatang Widyanto
$sql=SELECT num FROM count where dept='$dept' AND deptsub='$deptsub'; begin of replace -- $result = mysql_query($sql,$db); $page_count = mysql_num_rows($result); # If does not exist in the database, insert a new entry if

[PHP-DB] how to clear the array

2002-11-20 Thread karthikeyan
How to clear an array? i used unset. But it destroys the array property of the variablke itself. I just need to clear the contents. Pls tell me how THakns Karthikeyan.S - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: [PHP-DB] how to clear the array

2002-11-20 Thread Dave Smith
How about: $my_array = array(); // clears the whole array (and makes a new one) Or: $my_array[$i] = null; // clears a single entry in the array at index $i --Dave karthikeyan wrote: How to clear an array? i used unset. But it destroys the array property of the variablke itself. I just need

Re: [PHP-DB] FW: Selecting not on DB

2002-11-20 Thread Ignatius Reilly
You could create an auxiliary table nb_1_10 containing a field nb with all integers from 1 to 10 Then perform a SELECT join: SELECT nb_1_10.* FROM ABC, nb_1_10 WHERE nb_1_10.nb NOT IN ABC.number AND some condition that returns only one row from ABC - like here (1,4,6,10) Ignatius