[PHP-DB] MySQL newbie: inserting new entry to table?

2001-07-29 Thread sg
Hi folks! I'm new to PHP/mysql. I created a db with one table (using PhpMyAdmin). The table is called 'addressbook' and the base 'mabase'. I can very well read the table and display it very neatly using the below code, but I CAN'T write new entries using the code in the second page (end of mail

RE: [PHP-DB] MySQL newbie: inserting new entry to table?

2001-07-29 Thread Howard Picken
Have a look at how I would insert data in your case. Howard -Original Message- From: sg [mailto:[EMAIL PROTECTED]] Sent: Sunday, 29 July 2001 8:57 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL newbie: inserting new entry to table? Hi folks! I'm new to PHP/mysql. I created a db wit

Re: [PHP-DB] MySQL newbie: inserting new entry to table?

2001-07-29 Thread sg
Thank You Howard! You sure are quick! I found a way to make it work. I used to have both scripts (the one that displays and the one that inserts new entries) on the same page... Once I separated them I had a link on a third page. I first clicked on the insert entry link then back to the display

[PHP-DB] Re: Checking radio buttons for multiple records/Updating multiple records...

2001-07-29 Thread Hugh Bothwell
"Olinux" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Simplified: I have a tabble of users with an AUTHORIZE field > [type ENUM - Yes or No]. They sign up and once I authorize > them. I pull up all of the records and display them something > like this:

RE: [PHP-DB] replace string - case insensitive

2001-07-29 Thread Dave Watkinson
go to http://www.php.net/eregi_replace hth Dave -Original Message- From: J- E- N [mailto:[EMAIL PROTECTED]] Sent: 28 July 2001 15:41 To: [EMAIL PROTECTED] Subject: [PHP-DB] replace string - case insensitive hello str_replace is case sensitive, what function should i use for case

[PHP-DB] How to I fetch an image file from /tmp directory?

2001-07-29 Thread Mark Gordon
I am inserting binary image data into a mysql table (mediumblob). Actually, what goes into the table is the /tmp... pathname. This is the code I used to try to retrieve, but I get "Resource ID#2" $get=mysql_query("SELECT bin_data FROM binary_data WHERE id=$id"); print""; = Mark [EMAIL P

RE: [PHP-DB] How to I fetch an image file from /tmp directory?

2001-07-29 Thread David Balatero
Don't you still have to do mysql_fetch_array()? Because $get=mysql_query() is just a pointer to the mysql_query, right? To grab the data you'd need to do something like this: Of course, this is speculation, I never have done any binary data from MySQL stuff before, but this is what it SEEMS

[PHP-DB] excellent reference for form info

2001-07-29 Thread olinux
Here's a VERY helpful link to help deal with a number of form situations. http://www.linuxguruz.org/z.php?id=33 Little demo's of each too! olinux _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Da

[PHP-DB] Still trying to get image from /tmp path

2001-07-29 Thread Mark Gordon
Thanks, David. That helped a little but now what I get is: in the output. The tmp folder is up the directory tree outside of my www folder (on my web host's 'puter)- I don't have direct access to it. Heres the modified code: $sql=mysql_query("SELECT bin_data FROM binary_data WHERE id=4");

[PHP-DB] multiple table query error

2001-07-29 Thread Steve Fitzgerald
I've figured out (with some help) how to query two tables at the same time. In order to get a corresponding CompanyName with a specified ContactID I created a SQL query that selects both tables ($table_name1,$table_name2) and then selects contacts.CompanyID = '$CompanyID'. The result is a match fo

[PHP-DB] Finding NoMatches in MySQL

2001-07-29 Thread Dave Watkinson
Hi all During the process of importing a lot of Oracle data into MySQL, I have two tables that are giving me a bit of a headache. One is a list of jobs and the other is a list of employers. There's now a unique id for each table, and the job table also has a column called id1, which *should* corr

RE: [PHP-DB] Still trying to get image from /tmp path

2001-07-29 Thread David Balatero
No no no, what you want to do is echo $row[0], not . $row[0] is the actual jpeg data, and the browser will interpret it like that since you put the header("Content-type: text/jpeg"); Try echoing $row[0] only and tell me how that goes. -- David -Original Message- From: Mark Gordon [mailt

[PHP-DB] Query displays one

2001-07-29 Thread Mike Gifford
Hello, I've got a pretty basic query which I am trying to run within a function. The query looks like this: SELECT a.title,a.alt_title,a.articleID,a.articleSectionID,sect.URLname FROM $articlestable a, $categorytable sect WHERE a.articleSectionID = sect.articleSectionID

Re: [PHP-DB] Still trying to get image from /tmp path

2001-07-29 Thread Luc Servaas
Maybe this helps: $file = "/tmp/pathtoimage/image.jg" $fp = fopen($file, filesize($file)); $image = fread($fp, filesize($file)); //not sure about fread function¿ print $image //or imagejpeg($image), I'm not sure.. Grtz, Luc [EMAIL PROTECTED] - Original Message - From: "Mark Gordon" <[

[PHP-DB] Working code to insert images into MySQL (success!)

2001-07-29 Thread Mark Gordon
I worked all day on this, so I thought it might be useful to others. Its adapted from Florian Dittmer's article on PHPBuilder.com: http://phpbuilder.com/columns/florian19991014.php3 The script is for storing binary (image) data directly into a MySQL table. I did not have to create a separate DAT

Odp: [PHP-DB] InterBase

2001-07-29 Thread Jarek Zgoda
Od: "Sergey Larionov" <[EMAIL PROTECTED]> Temat: [PHP-DB] InterBase > "Warning: InterBase: arithmetic exception, numeric overflow, or string > truncation Cannot transliterate character between character sets in > /home/larionov/public_html/base.php on line 6" > How I can turn off tranliterat

RE: [PHP-DB] 2 Tables- 1 Insert Problem

2001-07-29 Thread Doug Semig
Beyond that excellent answer, this is exactly the kind of situation where transactions would be helpful (and in a lot of cases, mission critical). So an expanded quasi-pseudocode rendition of olinux's answer could be: $result_bt = mysql_query('[whatever it takes to begin a transaction]'); $resul

RE: [PHP-DB] PHP and Informix installation

2001-07-29 Thread Sommai Fongnamthip
Halo, How could I set up Informix driver in my Linux Server? SF At 13:26 27/7/2001 -0500, Muciño Zúñiga Marco Antonio wrote: >OK, I set my LIBS environment variable to my esql -libs result and the >confire shell is OK now, but now I get the next error when running the make >command: > >#

[PHP-DB] Image Bank with php & mysql!! ??!!

2001-07-29 Thread Koutsogiannopoulos Karolos
Hello everyone... I wan't your opinion regarding a program i am constructing. It is about an image bank for graphic studios or anyone else who needs a program that can insert his pictures or descriptions of it and be able to make a fast and reliable search. The Question is: What would be

Re[2]: [PHP-DB] Still trying to get image from /tmp path

2001-07-29 Thread Sergey Larionov
Afternoon, Luc! .·•Cite 30 èþëÿ 2001 ã., 4:21:32•·. LS> Maybe this helps: LS> $file = "/tmp/pathtoimage/image.jg" LS> $fp = fopen($file, filesize($file)); LS> $image = fread($fp, filesize($file)); //not sure about fread function¿ LS> print $image //or imagejpeg($image), I'm not sure.. No. When