[PHP-DB] I'm not getting any mailing list messages

2004-08-12 Thread Chip Wiegand
I just subscribed to the list yesterday and have yet to receive any messages from the list. Any ideas? -- Chip Wiegand Computer Services Simrad, Inc 425-778-8821 425-771-7211 (FAX)

[PHP-DB] How to do an update with arithmetic from a user input

2004-08-12 Thread Chip Wiegand
but that doesn't work. I have pasted in the main part of the code below... Thanks for any help you can provide, Chip Wiegand Computer Services Simrad, Inc 425-778-8821 425-771-7211 (FAX) BTW, thanks for the replys to the first message, I was expecting

Re: [PHP-DB] How to do an update with arithmetic from a user input

2004-08-12 Thread Chip Wiegand
Justin Patrin <[EMAIL PROTECTED]> wrote on 08/12/2004 12:55:24 PM: > On Thu, 12 Aug 2004 12:46:19 -0700, Chip Wiegand > <[EMAIL PROTECTED]> wrote: > > I have an existing database and web page showing the query results. I have > > added another field to allow a user

Re: [PHP-DB] How to do an update with arithmetic from a user input

2004-08-12 Thread Chip Wiegand
Justin Patrin <[EMAIL PROTECTED]> wrote on 08/12/2004 01:37:35 PM: > Unless $part_number is a number, you're going to want to put quotes > around it. Well, actually, you want to run mysql_real_escape_string() > on it. > > You also don't seem to have an end to that if statement. Usually, > people

[PHP-DB] query of two tables returns too many rows, many more than the two tables contain

2004-11-11 Thread Chip Wiegand
rows that are in the dealers table but not in the blackgate_users table. Thanks for any help, Chip Wiegand Computer Services Simrad, Inc 425-778-8821 425-771-7211 (FAX) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] query of two tables returns too many rows, many more than the two tables contain

2004-11-11 Thread Chip Wiegand
he right side but leave NULL entries where there's no > match). Then we tell it that the field we want to compare is > DealnerName in both cases. The WHERE clause says only show us where > DealerName is null (meaning no corresponding record in blackgate_users). > > &

[PHP-DB] storing images in database

2005-01-25 Thread Chip Wiegand
I have stored a .jpg image in a database, then when I make a sql statement to display that image on a web page all I get is the cryptic code in place of the image. I am storing it in a row configured as a blob, mime type image/jpeg and binary (using phpMyAdmin). What am I doing wrong? Regards,

RE: [PHP-DB] storing images in database

2005-01-25 Thread Chip Wiegand
t;); > > @mysql_select_db("binary_data"); > > $query = "select bin_data,filetype from binary_data where id=$id"; > $result = @MYSQL_QUERY($query); > > $data = @MYSQL_RESULT($result,0,"bin_data"); > $type = @MYSQL_RESULT($result,0,"filetype&quo

RE: [PHP-DB] storing images in database

2005-01-25 Thread Chip Wiegand
FWIW, I have the image stored in the database in a blob field, is that correct? -- Chip > >From: Chip Wiegand <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: RE: [PHP-DB] storing images in database > >Date: Tue, 25 Jan 2005 12:44:44 -0800 > > > >

RE: [PHP-DB] storing images in database

2005-01-25 Thread Chip Wiegand
en Koert" <[EMAIL PROTECTED]> wrote on 01/25/2005 01:06:01 PM: > And how are you feeding the $id?are you setting a value for that > element? > > In the sample code the default is the record_id that corresponds back to the > id of the row with the image blob field

RE: [PHP-DB] storing images in database

2005-01-26 Thread Chip Wiegand
Thanks for all the tips guys. I'll keep the last couple for future reference. -- Chip Gareth Heyes <[EMAIL PROTECTED]> wrote on 01/26/2005 05:30:45 AM: > >> if(isset($_GET['id'])) { > >> $id=$_GET['id']; > >> $query = "select bin_data, filetype from binary_data where id=$id"; > > This is a

[PHP-DB] odd results when running this

2005-01-28 Thread Chip Wiegand
Okay, so I have got the php bits working in this web page but it is running 3 times every time the page loads, and I see no reason why (I have opened this page in two differant browsers). The code for the entire page is pasted below, it includes some calls to include files which are not include

RE: [PHP-DB] odd results when running this

2005-01-28 Thread Chip Wiegand
rom hotspots"; > $result = mysql_query($sql); > $x = 1; > > while ( $row = mysql_fetch_array($result)) >{ > printf(" title=\"%s\">%s", $row["alt-text"], > $row["title-text"], $row["desc-text"]); >$x++; >}

RE: [PHP-DB] odd results when running this

2005-01-28 Thread Chip Wiegand
and reduce the code to pretty much what i had... > > bastien > > >From: Chip Wiegand <[EMAIL PROTECTED]> > >To: php-db@lists.php.net > >Subject: RE: [PHP-DB] odd results when running this > >Date: Fri, 28 Jan 2005 09:17:35 -0800 > > > >Thanks fo

[PHP-DB] looking for a particular script, or how-to...

2002-03-07 Thread chip . wiegand
s accessing the database. Any suggestions? -- Chip Wiegand Computer Services Simrad, Inc www.simrad.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why d

[PHP-DB] need a solution for web page navigation

2002-06-14 Thread chip . wiegand
I am using php/mysql. If anyone has any idea what I am trying to do please attempt to help... -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and found

[PHP-DB] sql query problem

2002-06-14 Thread chip . wiegand
column only) and blue2 (name column only) like this- title1 blue2 I am finding it difficult to write the proper select statement to get just those items in a web page using php/mysql. Suggestions? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There

[PHP-DB] Graphing data

2002-07-10 Thread chip . wiegand
Is there any application available that can take data from my mysql database and draw graphs? I am using mysql/php on FreeBSD. -- Chip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] A problem with insert to mysql from a web interface

2002-07-13 Thread Chip Wiegand
I just set up a pc with mysql-3.23.51/php-4.2.1/apache-1.3.26. I have created a database and tables and a web interface to insert data into it. I can insert data from the command line just fine. From the web interface there is nothing inserted and no error messages. I have tried connection string

Re: [PHP-DB] A problem with insert to mysql from a web interface

2002-07-13 Thread Chip Wiegand
On Sat, 2002-07-13 at 00:52, Jason Wong wrote: > On Saturday 13 July 2002 14:49, Chip Wiegand wrote: > > I just set up a pc with mysql-3.23.51/php-4.2.1/apache-1.3.26. I have > > created a database and tables and a web interface to insert data into > > it. I can insert data

[PHP-DB] extract data from database into an array

2002-07-13 Thread Chip Wiegand
I have a database, all the data is numbers. I want to make a query that will extract the data and then make it available in an array, so the array is populated 'real-time'. I could just enter the number into an array manually, but I want to automate the job. I don't know what to start looking for,

Re: [PHP-DB] extract data from database into an array

2002-07-15 Thread chip . wiegand
"Adam Alkins" <[EMAIL PROTECTED]> wrote on 07/13/2002 07:56:46 PM: > > I have a database, all the data is numbers. I want to make a query that > > will extract the data and then make it available in an array, so the > > array is populated 'real-time'. I could just enter the number into an > > ar

[PHP-DB] change data before its sent to db?

2002-07-16 Thread chip . wiegand
ases order by 'month'"; elseif ($orderby == 'month_num2'): $sql = "select * from releases order by 'month' desc"; The html select Month: None Jan Feb etc -- Chip Wiegand Computer Services Simrad

[PHP-DB] problem getting form input field to become part of query statement

2002-08-02 Thread Chip Wiegand
I have a form with a select list and a hidden field to save the selected item. On submit another page is loaded with a few fields to be filled in and submitted to a table. Using get I see the data is being passed from the first page to the second properly, and the second page sends its data proper

RE: [PHP-DB] problem getting form input field to become part ofquery statement

2002-08-03 Thread Chip Wiegand
ode below). I am at a loss as to why this is not working. If I replace the $listbox variable with the table name shown in the echo statement, a connection is made and the query is completed. -- Chip W www.wiegand.org [EMAIL PROTECTED] > -Original Message- > From: Chip Wiegand [mailto:[

[PHP-DB] odbc connect problem

2002-08-09 Thread chip . wiegand
escription \n"; } echo ""; echo ""; ?> -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipm

Re: [PHP-DB] odbc connect problem

2002-08-09 Thread chip . wiegand
// get the field > > "ProductLineDescription" > > $number= odbc_result( $result, 2 ); // get the field "ItemNumber" > > $description= odbc_result( $result, 3 ); // get the field > > "ItemDescription" > > > > > > ec

Re: [PHP-DB] odbc connect problem

2002-08-09 Thread chip . wiegand
ber, > >>> ItemDescription FROM IM1_InventoryMasterFile where DefaultWhse = > >>> 004"); > >>> if (!$result) { > >>> Error_handler( "Error in odbc_exec( no cursor returned ) " , > >>> $connect ); > >>

Re: [PHP-DB] odbc connect problem

2002-08-12 Thread chip . wiegand
> > >>>>> Untitled > >>>>> > >>>>> > >>>>> >>>>> $connect = odbc_connect("localhost", "", "-"); > >>>>> if (!$connect) > >>>>>

[PHP-DB] user authentication problem

2002-08-13 Thread chip . wiegand
wsers cache does not help. Any ideas what's going on here? http://www.simradusa.com/auth_dealers/dealers_page.php' ); } ?> -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home."

[PHP-DB] oddity with insert multiple input fields to multiple tables

2002-08-17 Thread Chip Wiegand
I have a web page interface to a mysql database. In this web page I have about a dozen form input fields. On submit these are submitted to multiple tables, a differant table for each input field. If I leave any fields blank, and insert only some of the fields, the database will insert an empty row

Re: [PHP-DB] oddity with insert multiple input fields to multipletables

2002-08-17 Thread Chip Wiegand
orkout-abs.php on line 111 I have 4 fields, 3 will always be filled, 1 is optional. I thought I would try to test for any of the 3 being empty but it didn't work. -- Chip > On Sat, 2002-08-17 at 17:08, Chip Wiegand wrote: > > I have a web page interface to a mysql database. In th

Re: [PHP-DB] oddity with insert multiple input fields tomultipletables

2002-08-17 Thread Chip Wiegand
== "") { mysql_query($sql_am) or die ("Error in this query >>$sql<< : " .mysql_error()); } But I still get empty rows inserted into the tables. -- Chip > > > -Original Message- > > > From: Chip Wiegand [mailto:[EMAIL PROTECTED]

Re: [PHP-DB] oddity with insert multiple input fields tomultipletables

2002-08-18 Thread Chip Wiegand
On Sun, 2002-08-18 at 01:20, Joni Järvinen wrote: > > if (!isnull($date_am || $exercise_am || $reps_am)) then > > mysql_query($sql_am) or die > > ("Error in this query >>$sql<< : " .mysql_error()); > > Try: > > if(!isnull($date_am) && !isnull($exercise_am) && !isnull($reps_am)) > > This should

Re: [PHP-DB] oddity with insert multiple input fields tomultipletables

2002-08-18 Thread Chip Wiegand
On Sun, 2002-08-18 at 01:20, Joni Järvinen wrote: > > if (!isnull($date_am || $exercise_am || $reps_am)) then > > mysql_query($sql_am) or die > > ("Error in this query >>$sql<< : " .mysql_error()); > > Try: > > if(!isnull($date_am) && !isnull($exercise_am) && !isnull($reps_am)) > > This should

Re: [PHP-DB] oddity with insert multiple input fields - olved

2002-08-18 Thread Chip Wiegand
On Sun, 2002-08-18 at 01:20, Joni Järvinen wrote: > > if (!isnull($date_am || $exercise_am || $reps_am)) then > > mysql_query($sql_am) or die > > ("Error in this query >>$sql<< : " .mysql_error()); > > Try: > > if(!isnull($date_am) && !isnull($exercise_am) && !isnull($reps_am)) > > This should

[PHP-DB] what's wrong with this ereg?

2002-08-20 Thread chip . wiegand
t do I need to do to fix this? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why

Re: [PHP-DB] what's wrong with this ereg?

2002-08-20 Thread chip . wiegand
> > Parse error: parse error, unexpected T_BOOLEAN_OR in > > /usr/local/apache/htdocs/auth_dealers/user_input2.php on line 70 > > > > What do I need to do to fix this? > > > > -- > > Chip Wiegand > > Computer Services > > Simrad, Inc &

[PHP-DB] keeping form field data when reloading a form

2002-08-20 Thread chip . wiegand
d not have to re-enter all the data. But how? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They

Re: [PHP-DB] keeping form field data when reloading a form

2002-08-21 Thread chip . wiegand
are checked > > also, but when I do enter > > some wrong data the form is reloaded with all blank fields. I'm sure there > > is a way to keep the existing > > data in the fields so the end-user will only have to change the incorrect > > fields, and not have to re-ent

[PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
ve been testing this and it allows as many letters as I put in there, but not 1 only. What's wrong? Also, when using eregi do I need to specify A-Za-z or just a-z, since it is case-insensitive? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
Jason Wong <[EMAIL PROTECTED]> wrote on 08/21/2002 10:00:23 AM: > On Thursday 22 August 2002 00:29, [EMAIL PROTECTED] wrote: > > I hope this isn't too far off topic - > > > > I have a regex for validating email addresses - > > > > if (empty($useremail) || !eregi("^([A-Za-z0-9\.\_-])+@([A-Za-z0-9\

Re: [PHP-DB] form validation question - regex not working

2002-08-21 Thread chip . wiegand
Jason Wong <[EMAIL PROTECTED]> wrote on 08/21/2002 12:10:02 PM: > It's only checking for addresses of the form [EMAIL PROTECTED] > As you can see, the list address ([EMAIL PROTECTED]), and my address > ([EMAIL PROTECTED]) would be treated as invalid. Not very clever is it? Got it figured out, an

[PHP-DB] verify text entry in a textarea doesn't work

2002-08-27 Thread chip . wiegand
; } I use the same type of checking on input type="text" boxes and it works fine. Any ideas why it doesn't work on a textarea field? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home

Re: [PHP-DB] verify text entry in a textarea doesn't work

2002-08-27 Thread chip . wiegand
corner, whereas before it was one tab furthor into the box, now I know why that happens also. thanks, -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairma

[PHP-DB] update db problem

2002-09-10 Thread chip . wiegand
form field). When I make any changes and press submit, the changes to fields other than rma_status, those fields are updated or left as is, but the rma_status textarea is wiped out. Also, instead of updating the current item in the db, it is submitting another row into the database, giving multiple ro

[PHP-DB] how do I echo this statement to the browser?

2002-09-20 Thread Chip Wiegand
I want to get the first name, last name, total row count, and total time a name appears in the database. Something like this - select f_name, l_name, count(*) as 'Total Kids', count distinct l_name from kids group by l_name it doesn't work of course, the count distinct l_name part is completely

Re: [PHP-DB] how do I echo this statement to the browser? -solved

2002-09-21 Thread Chip Wiegand
lumns $row1['Total_Kids'] and $row2['Total_Rows'] > > When MySQL supports subqueries, you can write: > > SELECT f_name, l_name, COUNT(*) AS Total_Kids > FROM kids > GROUP BY l_name > JOIN > SELECT COUNT(*) AS Total_Rows > FROM kids > > HTH

[PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread chip . wiegand
t the user being forced to go through the logon screen? Thanks, -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipment Co

[PHP-DB] big sessions problem - page refusing to load, but will if I skip the logonpage

2002-09-30 Thread chip . wiegand
I've gotta get this fixed ASAP, perminently, this is a business web site. The code for the login screen and the main page are pasted below. Regards, -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in the

Re: [PHP-DB] alter table statement from within php web page

2002-10-01 Thread Chip Wiegand
Forget it, It works, I was entering a field name with a space in it, and that was causing the problem. Duh! -- Chip phpdbOn Tue, 2002-10-01 at 22:01, Chip Wiegand wrote: > I would like to know how to add columns to an existing table. I've tried > this - > > $qry = mysql_q

[PHP-DB] alter table statement from within php web page

2002-10-01 Thread Chip Wiegand
I would like to know how to add columns to an existing table. I've tried this - $qry = mysql_query("alter table exercises add column $fieldname char($length) not null") or die(sql_error()); but it doesn't work, I get this error - 1064: You have an error in your SQL syntax near 'lifts, char(25),

[PHP-DB] a menu item from a database, linked to a list from a another table

2002-11-13 Thread chip . wiegand
statement? Is this even possible? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of Digital Equipment Corporation, 1977 (They why do I have 8

Re: [PHP-DB] a menu item from a database, linked to a list from a anothertable

2002-11-14 Thread chip . wiegand
Jason Wong <[EMAIL PROTECTED]> wrote on 11/13/2002 10:46:32 PM: > On Thursday 14 November 2002 07:32, [EMAIL PROTECTED] wrote: > > Is this even possible? I have a menu that is generated from a table. > What is your menu -- a set of tags? or a selector box? I suspect you mean > the latter ... N

[PHP-DB] database update question

2002-11-15 Thread chip . wiegand
id = '11' but of course that changed the file name for id 11 to %.zip. Is there a way to change all the entries from .pdf to .zip without writing an update statement for each individual row? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There i

[PHP-DB] database update question

2002-11-15 Thread chip . wiegand
id = '11' but of course that changed the file name for id 11 to %.zip. Is there a way to change all the entries from .pdf to .zip without writing an update statement for each individual row? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There i

[PHP-DB] Why the following error, yet it works anyway

2002-01-14 Thread chip . wiegand
ot;news_id"]."? " .$row["bulletin_subject"]."\n\n"; } ?> Back ---- -- Chip Wiegand Computer Services Simrad, Inc www.simrad.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home.&

RE: [PHP-DB] Why the following error, yet it works anyway

2002-01-14 Thread chip . wiegand
"select news_id, bulletin_subject from dbulletins"; > endif; > $result = mysql_query($sql); > while ($row = mysql_fetch_array($result)) > { > print "\nDelete entry > ".$row["news_id"]."? " > .$row["bulletin_su

[PHP-DB] query results page ignores style sheet reference

2002-12-12 Thread chip . wiegand
es are obeyed by the results page. This is quite strange. Anyone seen this behavior before? -- Chip Wiegand Computer Services Simrad, Inc www.simradusa.com [EMAIL PROTECTED] "There is no reason anyone would want a computer in their home." --Ken Olson, president, chairman and founder of

[PHP-DB] Odd browser problem with sessions

2003-01-28 Thread chip . wiegand
behavior appears to only effect IE, I saw it once on either Netscape or Mozilla (I don't recall which), and no one I've talked to on the phone has had this problem in any browser other than IE, and there have been many calls about this. Any idea what this might be caused by? Thank

Re: [PHP-DB] Odd browser problem with sessions

2003-01-29 Thread chip wiegand
to the > proper page. This behavior appears to only effect IE, I saw it once on > > either Netscape > or Mozilla (I don't recall which), and no one I've talked to on the > phone has had this > problem in any browser other than IE, and there have been many calls > abou

RE: [PHP-DB] address info, forms, maintanance

2003-06-06 Thread chip . wiegand
"John W. Holmes" <[EMAIL PROTECTED]> wrote on 06/04/2003 05:24:22 PM: > > Thanks to everyone for the suggestions. Got it fixed. Just added a > couple > > lines of code - > > $sql1 = "select * from endusers where name like '$name'"; > >$result1 = mysql_query($sql1); > > $count1 = mysq

[PHP-DB] address info, forms, maintanance

2003-06-05 Thread chip . wiegand
I need to modify some company web pages that include a form for asking the company departments questions, such as service dept, etc. As the forms are currently built there is some field validation but no cookies. This info is saved in a mysql database, problem is, there are duplicate entries, e

Re: [PHP-DB] address info, forms, maintanance

2003-06-05 Thread chip . wiegand
Dan Brunner <[EMAIL PROTECTED]> wrote on 06/04/2003 01:24:13 PM: > Hello!! > Are talking about the same "Post Question"??? > On another words, what is being duplicated?? > If not, you can use auto_increment. > Dan This pertains to every time a person visits the page and fills in the form - today

Re: [PHP-DB] address info, forms, maintanance

2003-06-05 Thread chip . wiegand
Thanks to everyone for the suggestions. Got it fixed. Just added a couple lines of code - $sql1 = "select * from endusers where name like '$name'"; $result1 = mysql_query($sql1); $count1 = mysql_num_rows($result1); if ($count1 == "0" ) $sql = "insert into endusers..bl

[PHP-DB] regex question

2005-03-07 Thread Chip Wiegand
I am writing some regex on a php form to validate input and have come up with this, for example - if (empty($first) || !eregi("^[A-Za-z]+[- ]?[A-Za-z]+$", $first)) for checking a persons name. This allows a single name, or a hyphenated double name, or a non-hyphenated double name, and it works.

[PHP-DB] undefined function error

2005-03-18 Thread Chip Wiegand
I have a web site that connects to a mysql database using this connect script - When I access the page it gives me this error - Fatal error: Call to undefined function: mysql_connect() in /usr/local/www/data-dist/connect on line 1 Using mysql-4.1.10a for FreeBSD-5.3 with php-4.3.9 Any idea