I have a web site that connects to a mysql database using this connect
script -
? $db=mysql_connect(localhost,***,***);
mysql_select_db(simradusa,$db);
?
When I access the page it gives me this error -
Fatal error: Call to undefined function: mysql_connect() in
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.
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
= mysql_fetch_array($result))
{
printf(pimg src=\hotspots/latest$x.gif\ alt=\%s\
title=\%s\/pp class=\footnote\%s/p, $row[alt-text],
$row[title-text], $row[desc-text]);
$x++;
}
?
bastien
From: Chip Wiegand [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Subject: [PHP-DB
...
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 for the tips.
I find this confusing - I have 3 statements pulling 3 differant images,
so
I don't understand why
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 really bad
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,
=$id;
$result = @MYSQL_QUERY($query);
$data = @MYSQL_RESULT($result,0,bin_data);
$type = @MYSQL_RESULT($result,0,filetype);
Header( Content-type: $type);
echo $data;
};
?
bastien
From: Chip Wiegand [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Subject: [PHP-DB] storing
the default is the record_id that corresponds back to
the
id of the row with the image blob field.
Bastien
From: Chip Wiegand [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: PHP DB php-db@lists.php.net
Subject: RE: [PHP-DB] storing images in database
Date: Tue, 25 Jan 2005 12:57:40 -0800
the 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
is
DealnerName in both cases. The WHERE clause says only show us where
DealerName is null (meaning no corresponding record in blackgate_users).
I think that'll do it for ya.
-TG
-Original Message-
From: Chip Wiegand [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 11, 2004 4:28
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)
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 the list
to be much more busy
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 to input a two digit number. I
want
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 use
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 =
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,
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,
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..blah
), 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?
Thanks,
--
Chip Wiegand
Computer Services
Simrad, Inc
www.simradusa.com
[EMAIL PROTECTED]
There is no reason
. 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 about
this. Any
idea what this might be caused by?
Thanks,
--
Chip
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 Digital Equipment
Corporation
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 is no reason anyone would want a computer
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 is no reason anyone would want a computer
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 a tags? or a selector box? I suspect you
mean
the latter ...
Not a
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? Somebody
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_query(alter table exercises
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),
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 their home.
--Ken
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
Corporation, 1977
, l_name, COUNT(*) AS Total_Kids
FROM kids
GROUP BY l_name
JOIN
SELECT COUNT(*) AS Total_Rows
FROM kids
HTH
Ignatius
- Original Message -
From: Chip Wiegand [EMAIL PROTECTED]
To: phpdb [EMAIL PROTECTED]
Sent: Saturday, September 21, 2002 7
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
of updating the current item in the db, it is submitting
another row into the database, giving multiple rows of
the same rma, but with each one showing it's edits over time. This would be
fine for historical purposes, but not what I want.
What am I doing wrong?
--
Chip Wiegand
Computer Services
comments/li/font\n;
}
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.
--Ken
, 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, chairman and founder of Digital
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-enter
all the data. But how?
--
Chip Wiegand
Computer Services
Simrad, Inc
www.simradusa.com
[EMAIL PROTECTED]
There is no reason anyone would
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 reason anyone would want
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\_-])
+\.
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, and
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 do I have 9? Somebody help me!)
--
PHP
/var/www/html/auth_dealers/user_input2.php on
line
70
and on another server I get this error:
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
, and 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 why do I have 9
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 this web page I have
about a dozen form input fields. On submit these are submitted to
multiple
: Chip Wiegand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 18 August 2002 7:08 AM
To: phpdb
Subject: [PHP-DB] oddity with insert multiple input fields to multiple
tables
I have a web page interface to a mysql database. In this web page I have
about a dozen form input fields
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 IMO work :)
-Joni-
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 IMO work :)
-Joni-
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 IMO work :)
-Joni-
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
;
}
}
if ( ! $auth ) {
header( 'WWW-Authenticate: Basic realm=Private' );
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
exit;
} else {
header( 'Location:
http://www.simradusa.com/auth_dealers/dealers_page.php' );
}
?
--
Chip Wiegand
Computer Services
Simrad, Inc
ItemNumber
$description= odbc_result( $result, 3 ); // get the field
ItemDescription
echo trtd$brand/tdtd$number/tdtd$description/td/tr
\n;
}
echo /table;
echo /body/html;
?
--
Chip Wiegand
Computer Services
Simrad, Inc
www.simradusa.com
[EMAIL PROTECTED
$number= odbc_result( $result, 2 ); // get the field
ItemNumber
$description= odbc_result( $result, 3 ); // get the field
ItemDescription
echo
trtd$brand/tdtd$number/tdtd$description/td/tr
\n;
}
echo /table;
echo /body/html;
?
--
Chip Wiegand
PROTECTED]
-Original Message-
From: Chip Wiegand [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 03, 2002 12:51 AM
To: phpdb
Subject: [PHP-DB] problem getting form input field to become part of
query statement
I have a form with a select list and a hidden field to save the selected
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
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
array
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
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 from the command line just
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
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
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 founder of Digital Equipment
Corporation, 1977
(They why do I have 9
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
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 do I have 7? Somebody help me!)
/a/center
/body
/html
--
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
=bulletin_admin.phpBack/a/center
/body
/html
--
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
63 matches
Mail list logo