[PHP-DB] insert (database)

2005-02-02 Thread Yemi Obembe
the objective of the script below is to first search if a subscriber is already in a list before subscribing his email (so as to prevent double subscription). the select part works finebut the insert doesnt. know why? if ($v = strtolower($_POST['email'])) { $db = mysql_connect(mysql,

[PHP-DB] flush()

2005-02-02 Thread Yemi Obembe
I dont seem to understand the description for flush() in thew php websitehope someboody can tell me what it is really about. - A passion till tomorrow, Opeyemi Obembe | ng.clawz.com - Do you Yahoo!?

Re: [PHP-DB] insert (database)

2005-02-02 Thread Jochem Maas
Yemi Obembe wrote: the objective of the script below is to first search if a subscriber is already in a list before subscribing his email (so as to prevent double subscription). the select part works finebut the insert doesnt. know why? if ($v = strtolower($_POST['email'])) { what happens

RE: [PHP-DB] database connectivity problem

2005-02-02 Thread Adams, Jonathan K. [C]
Thanks Martin... You were right... I had to make Apache run as sybase (gasp!) for it to work really funky but it works... -Original Message- From: Martin Norland [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 3:53 PM To: 'php-db@lists.php.net' Cc: 'php-db@lists.php.net'

[PHP-DB] Programmer required

2005-02-02 Thread ioannes
I'm looking for a programmer, preferably in London or UK, who has been maybe out of work for a few years, to discuss an easy project with. Pass the request on to your friends. John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] insert (database)

2005-02-02 Thread Bastien Koert
try if (mysql_num_rows($res)0) { echo bYour email: u$v/u already in the listbr; } else { $sql_in = INSERT INTO arcadia ('email') VALUES ('$v'); $result_in = mysql_query($sql_in); echo bYour email: u$v/u subscribed!br; } } else { include(index.php); exit; } bastien From: Yemi Obembe

Re: [PHP-DB] Best way to remove slashes?

2005-02-02 Thread Brent Baisley
It looks like you might be running addslashes multiple times, which means you would need to run stripslashes multiple times. This usually happens when you run addslashes on the data before entering into the database, but also have magic quotes enabled (which does the same thing). Use

Re: [PHP-DB] database connectivity problem

2005-02-02 Thread Martin Norland
Adams, Jonathan K. [C] wrote: Thanks Martin... You were right... I had to make Apache run as sybase (gasp!) for it to work really funky but it works... Probably better to figure out where the permissions are needed (no doubt somewhere in the filesystem) and see about adding one or the other

Re: [PHP-DB] Programmer required

2005-02-02 Thread Miles Thompson
This is waaay off topic, but: I hope you mean retired, who will presumably work for less. Why would you want one who's not current? Just wondering - Miles At 09:47 AM 2/2/2005, ioannes wrote: I'm looking for a programmer, preferably in London or UK, who has been maybe out of work for a few years,

Re: [PHP-DB] insert (database)

2005-02-02 Thread Martin Norland
Jochem Maas wrote: Yemi Obembe wrote: the objective of the script below is to first search if a subscriber is already in a list before subscribing his email (so as to prevent double subscription). the select part works finebut the insert doesnt. know why? if ($v =

Re: [PHP-DB] Programmer required

2005-02-02 Thread Martin Norland
Miles Thompson wrote: This is waaay off topic, but: I hope you mean retired, who will presumably work for less. Why would you want one who's not current? Just wondering - Miles At 09:47 AM 2/2/2005, ioannes wrote: I'm looking for a programmer, preferably in London or UK, who has been maybe out of

Re: [PHP-DB] Programmer required

2005-02-02 Thread Miles Thompson
At 11:10 AM 2/2/2005, Martin Norland wrote: Miles Thompson wrote: This is waaay off topic, but: I hope you mean retired, who will presumably work for less. Why would you want one who's not current? Just wondering - Miles At 09:47 AM 2/2/2005, ioannes wrote: I'm looking for a programmer, preferably

[PHP-DB] Connecting To Mysql through php/mysqli

2005-02-02 Thread J. Connolly
I am getting the gollowing error message: PHP Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in C:\Apache Group\Apache2\htdocs\PHP\_debug_tmp.php on line 5 PHP Fatal error: Call to undefined function mysqli_quesry() in C:\Apache

[PHP-DB] Update time/date stamp

2005-02-02 Thread Pete Holsberg
I would like to print the date and time my database was last updated but don't know the query for that. Ilooked at several websites that list MySQL variables but didn't find any that seemed to be what I want. Can anyone help? Thanks. --- Pete Holsberg Columbus, NJ --- When the people are

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Bastien Koert
any particular table? or just the db in general? bastien From: Pete Holsberg [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Update time/date stamp Date: Wed, 2 Feb 2005 10:56:08 -0500 (EST) I would like to print the date and time my database was last updated but don't know the query

RE: [PHP-DB] Connecting To Mysql through php/mysqli

2005-02-02 Thread Bastien Koert
mysqli_select_db progblem is that the arguements are reversed, should be $link, $dbname the second error is a misspelling in the mysqli_query command bastien From: J. Connolly [EMAIL PROTECTED] To: PHP list php-db@lists.php.net Subject: [PHP-DB] Connecting To Mysql through php/mysqli Date: Wed,

[PHP-DB] php cannot find mysql libs and includes after portupgrade

2005-02-02 Thread Sven Willenberger
FreeBSD 5.2.1 and portupgraded mysql-client and server to 4.0.23a. Then portupgrade -f lang/php4 and databases/php4-mysql. After this phpinfo() and any php application using mysql no longer finds the include and lib dirs and do not work. From phpinfo(): snip extension_dir =

[PHP-DB] Access

2005-02-02 Thread Darryl
Hay, I was just wondering if any of you had any links to websites that explained php programming with Access databases. Thanks in advance, Darryl

RE: [PHP-DB] Connecting To Mysql through php/mysqli

2005-02-02 Thread J. Connolly
Thank you Bastian, I found that the two variables were reversed right when your answer came in. The book i got is horrible. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Access

2005-02-02 Thread Bastien Koert
use the ODBC functions in php bastien From: Darryl [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Access Date: Wed, 2 Feb 2005 19:49:47 +0200 Hay, I was just wondering if any of you had any links to websites that explained php programming with Access databases. Thanks in advance,

[PHP-DB] Re: php cannot find mysql libs and includes after portupgrade

2005-02-02 Thread Sven Willenberger
On Wed, 2005-02-02 at 11:55 -0500, Sven Willenberger wrote: FreeBSD 5.2.1 and portupgraded mysql-client and server to 4.0.23a. Then portupgrade -f lang/php4 and databases/php4-mysql. After this phpinfo() and any php application using mysql no longer finds the include and lib dirs and do not

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Pete Holsberg
On Wed, 2 Feb 2005, Bastien Koert wrote: any particular table? or just the db in general? It has just one table. --- Pete Holsberg Columbus, NJ --- When the people are afraid of the government, that's tyranny. But when the government is afraid of the people, that's liberty. -- Thomas

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Bastien Koert
is there a timestamp or data time field in the table? If so just quuery that field for the max value select max(dateTimeFieldName) from TableName bastien From: Pete Holsberg [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED] CC: php-db@lists.php.net Subject: RE: [PHP-DB] Update time/date

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Pete Holsberg
On Wed, 2 Feb 2005, Bastien Koert wrote: is there a timestamp or data time field in the table? If so just quuery that field for the max value select max(dateTimeFieldName) from TableName No there isn't. When I view the table with phpMyAdmin, it displays a table that includes time/date

Re: [PHP-DB] Access

2005-02-02 Thread Robert Twitty
You have 3 options. Option 1: Use PHP's native odbc extension. This option is limited, and only works on @in32 platforms. Option 3: Use PHP's COM support. This option only works on @In32 platforms, and does not follow the function paradigm of PHP's database extensions. Example code:

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Bastien Koert
so select max(last_updated) bastien From: Pete Holsberg [EMAIL PROTECTED] To: php-db@lists.php.net Subject: RE: [PHP-DB] Update time/date stamp Date: Wed, 2 Feb 2005 14:06:35 -0500 (EST) On Wed, 2 Feb 2005, Bastien Koert wrote: is there a timestamp or data time field in the table? If so just

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Pete Holsberg
On Wed, 2 Feb 2005, Bastien Koert wrote: so select max(last_updated) bastien Error SQL-query : SELECT max( last_updated ) FROM Directory MySQL said: Unknown column 'last_updated' in 'field list' --- I see that I was unclear in my description of what I said. My table is

[PHP-DB] Re: Double Inserts

2005-02-02 Thread Peter K. Lee
Hi Shri, [EMAIL PROTECTED] (PHPDiscuss - PHP Newsgroups and mailing lists) writes: Hi, I am new to the mailing list and to PHP / MySQL. I am facing an unususal problem. I am trying to insert some data into MySQL DB through via Web. The code is executed OK - no errors but the same record gets

[PHP-DB] mysql 4.1-4.0

2005-02-02 Thread blackwater dev
Why is this query handled differently in 4.1? 4.0 select lower(concat(last_name,id)) from client where prim_id=1 returns johnson1 4.1 same query returns Johnson1 Why don't the lower work in 4.1 when you concatonate with a number? Thanks! -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] mysql 4.1-4.0

2005-02-02 Thread Martin Norland
blackwater dev wrote: Why is this query handled differently in 4.1? 4.0 select lower(concat(last_name,id)) from client where prim_id=1 returns johnson1 4.1 same query returns Johnson1 Why don't the lower work in 4.1 when you concatonate with a number? No idea. select concat(lower(last_name),id)

Re: [PHP-DB] mysql 4.1-4.0

2005-02-02 Thread blackwater dev
yeah, that is what I did to fix it...just curious why the problem was there in the first place. On Wed, 02 Feb 2005 14:40:55 -0600, Martin Norland [EMAIL PROTECTED] wrote: blackwater dev wrote: Why is this query handled differently in 4.1? 4.0 select lower(concat(last_name,id)) from

RE: [PHP-DB] Update time/date stamp

2005-02-02 Thread Bastien Koert
'show table status' will return a record set that you can parse to get the last update time bastien From: Pete Holsberg [EMAIL PROTECTED] To: php-db@lists.php.net Subject: RE: [PHP-DB] Update time/date stamp Date: Wed, 2 Feb 2005 15:00:34 -0500 (EST) On Wed, 2 Feb 2005, Bastien Koert wrote: so

Re: [PHP-DB] mysql 4.1-4.0

2005-02-02 Thread Bastien Koert
precedence of function order may have changed bastien From: blackwater dev [EMAIL PROTECTED] Reply-To: blackwater dev [EMAIL PROTECTED] To: php-db@lists.php.net Subject: Re: [PHP-DB] mysql 4.1-4.0 Date: Wed, 2 Feb 2005 15:46:25 -0500 yeah, that is what I did to fix it...just curious why the

RE: [PHP-DB] mysql 4.1-4.0

2005-02-02 Thread Bastien Koert
try select concat(lower(last_name),id) from client where prim_id=1 bastien From: blackwater dev [EMAIL PROTECTED] Reply-To: blackwater dev [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] mysql 4.1-4.0 Date: Wed, 2 Feb 2005 15:35:08 -0500 Why is this query handled differently in 4.1?

[PHP-DB] Table from an array?

2005-02-02 Thread Chris Payne
Hi there everyone Is it possible to create a database table from the first line of a CSV file? What I mean is, how would you create the table columns based on the CSV files columns? This would really help me out, as some times the table column counts change on data I have to import, so it

[PHP-DB] Storing JPEGS in MySQL

2005-02-02 Thread A Wood
I'd be grateful if someone could offer me some guidance on where I'm going wrong here, I'm sure I'm 99% of the way there... I want to read in a JPEG from a file upload form (HTML), resize it and store in in a MySQL DB. Then in another script I want to pull it out of the DB and display it.

Re: [PHP-DB] Storing JPEGS in MySQL

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 05:59, A Wood wrote: The image is resized like this, and as I say, this far its working fine... imagecopyresampled($image, $contents, 0, 0, 0, 0, $newxsize, $newysize, $orig_x, $orig_y); I then try to put it in the DB by passing the variable $image straight into

Re: [PHP-DB] Table from an array?

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 05:41, Chris Payne wrote: Is it possible to create a database table from the first line of a CSV file? What I mean is, how would you create the table columns based on the CSV files columns? Parse the first line and extract the column names, construct a suitable

RE: [PHP-DB] Table from an array?

2005-02-02 Thread Bastien Koert
Sure you could, the trick would be indentifiying the column data types, but perhaps you could put those in column name definition. ie user_id int(10), username varchar(50), etc bastien From: Chris Payne [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Table from an array? Date: Wed,

Re: [PHP-DB] Storing JPEGS in MySQL

2005-02-02 Thread Bastien Koert
this was discussed just last week..find the thread or go here http://www.weberdev.com/get_example.php3?count=4063 bastien From: Jason Wong [EMAIL PROTECTED] To: php-db@lists.php.net Subject: Re: [PHP-DB] Storing JPEGS in MySQL Date: Thu, 3 Feb 2005 07:55:39 +0800 On Thursday 03 February 2005

Re: [PHP-DB] Connecting To Mysql through php/mysqli

2005-02-02 Thread graeme
I like the idea of a mysqli_queasy() function. Maybe it would allow you to sumbit SQL statements that don't conform to any standard? ;) graeme. Bastien Koert wrote: the second error is a misspelling in the mysqli_query command bastien Call to undefined function mysqli_quesry() in C:\Apache --