Re: [PHP-DB] autoincrement start with higher number

2002-05-10 Thread Daniel Brunner

Hello!!

ALTER TABLE Table1 AUTO_INCREMENT = 1000;



Dan


On Friday, May 10, 2002, at 04:36 PM, [EMAIL PROTECTED] wrote:

 Is it possible to have an autoincrement field start with a number, so
 the first record would be, let's say, 1000 instead of 1?  The next would
 be 1001 instead of 2, etc.

 kind regards,

 bill hollett


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] How do I get a ' in my sql statement?

2002-06-10 Thread Daniel Brunner

Hello!!

Spit some code out...I put a lot of ' in my inserts...

Is it from a form?!?!!?

Is it from a Insert, or Select or Update?!?

That's why we need some code...


Dan


On Monday, June 10, 2002, at 12:01 PM, [EMAIL PROTECTED] wrote:

 I have noticed that when I try to assign the value of a input field 
 that has a  ' in it for example : can't   It will goof up my attempt 
 to load the information to the database. Anyone know a way around this? 
 Do I have to send each string through a parsing routine before 
 assigning my string to a variable that will be used in a SQL statement?


 Thanks,

 Blaine


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] auto increment

2002-06-14 Thread Daniel Brunner

Hello!!

ALTER TABLE $table1 AUTO_INCREMENT = 242

Replace the $table with your table's name and replace the end number 
with what number you want.

Dan


On Thursday, June 13, 2002, at 08:27 PM, [EMAIL PROTECTED] wrote:

 Hi guys,

 The auto_increment field of my MySQL table gives me 258, although the
 higher value at the moment is 241.

 I deleted the latest records, thinking that also the auto_increment 
 would
 decrease, but this is not.

 I would like to know if there is a way to bring the auto_increment back 
 to
 the higher value + 1.


 Cheers

 Daniele




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Resetting auto_incremented values

2002-06-20 Thread Daniel Brunner

Hello!!

ALTER TABLE $table1 AUTO_INCREMENT = 3


Dan




On Thursday, June 20, 2002, at 01:44 PM, [EMAIL PROTECTED] wrote:

 sorry buddy, as far as I know you can't.
 The only thing you can do is to set the counter higher but you can't 
 return
 to a value under
 the given row.

 Please correct me if  I am wrong,

 Andy

 --
 
 http://www.globosapiens.net
 Global Travellers Network!



 Martin Clifford [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]...
 Hi all,

 I have a table that has ARTICLE_ID as the primary key, 
 auto_incremented.  I
 have added three rows to this table, yet I want to delete the third.  
 Here
 it is now:

 1 - Item 1
 2 - Item 2
 3 - Item 3

 My question is, how do I delete Item 3, without having the next row's 
 index
 becoming 4?

 1 - Item 1
 2 - Item 2
 4 - Item 3

 Thanks in advance!

 Martin




 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] BBS program

2002-06-21 Thread Daniel Brunner

AHAHAHAH

Now that was funny!!

Do any of you remember the game Nuk'em?? That was a Blast!!

Dan


On Friday, June 21, 2002, at 12:50 PM, [EMAIL PROTECTED] wrote:

 BBS = Backyard Bible Study?

 Heh.  Good guess.  BBS = Bulliten Board System.

 Chris



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] passing variables from one page to another

2002-07-08 Thread Daniel Brunner

Hello!!

How are you fetching the rows???

mysql_fetch_rows?? or mysql_fetch_object???

Dan


On Monday, July 8, 2002, at 02:52 PM, [EMAIL PROTECTED] wrote:

 You're right--I did leave out that end quotation mark.  Unfortunately,
 though, I'm still getting the same result after adding it.

 best,

 Matt

 - Original Message -
 From: Martin Clifford [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, July 08, 2002 3:47 PM
 Subject: Re: [PHP-DB] passing variables from one page to another


 If that is your exact code, then you need to have an ending quote after 
 the
 query is written.  Like this:

 $query = Select * from course, disc, instit, prof where 
 course.CourseID =
 $CourseID and course.DiscID = disc.DiscID and course.InstitID =
 instit.InstitID and course.ProfID = prof.ProfID;

 Martin

 Matthew K. Gold [EMAIL PROTECTED] 07/08/02 03:40PM 
 Hi Everybody,

 Please forgive the basic nature of this question--I have looked at the
 manual, but I found that much of it went over my head.

 I'm trying to create a second level of a website that displays course
 listings.  The first level lists a bunch of courses.  I'd like users to 
 be
 able to click on the title of a course to go to a page that contains 
 details
 about that course.

 From what I understand, I should do this by making the title of the 
 course
 on the first page (courses.php) a link to the second page 
 (courseinfo.php)
 with a query string attached--so that the link would look like
  a href=courseinfo.php?CourseID=12Accounting 101/a

 What I'm having trouble doing is coding the second page.  Here's what 
 I've
 done.  When I run this, I get a blank page in return...if anyone can 
 help, I
 would greatly appreciate it.  Thanks in advance.

 Matt


 ?php
 $db = @mysql_connect(host,user,pword);
 mysql_select_db(dln, $db);

 if ( !$CourseID ) {
 print (no course id included)
 exit;
 };

 $query = Select * from course, disc, instit, prof where 
 course.CourseID =
 $CourseID and course.DiscID = disc.DiscID and course.InstitID =
 instit.InstitID and course.ProfID = prof.ProfID;
 $result = mysql_query ($query);
 echo MySQL error number  . mysql_errno() . :  . mysql_error();

 print (table border=\0\ cellpadding=\5\ class=\default\\n);

 print (tr
 bgcolor=\#ff9900\th$CourseID/th/trtrtd$CourseTitle/td/tr
 /t
 able);

 ?



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Auto Increment Problems....

2002-07-29 Thread Daniel Brunner

Once again...


ALTER TABLE table1 AUTO_INCREMENT = 500


Dan



On Monday, July 29, 2002, at 10:44 PM, [EMAIL PROTECTED] wrote:

 rite,

 my primary key column (id) is set to auto_increment as usual which is 
 very
 handy. But when I delete a row, the auto_increment just keeps 
 incrementing
 and there's this 'hole' left where I deleted the row!

 Apart from this looking ugly, it poses another problem. In my PHP script
 where I can add new rows, I query the table, checking how many rows in 
 the
 table altogether and set the new id as the next number, but this doesnt 
 work
 if theres 'holes' in the id field, as the new record tries to overwrite
 another id.

 So I've 2 questions
 1) Can the next auto_increment value be 'set' by a SQL query
 2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in 
 the ID
 column??

 TIA



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Auto Increment Problems....

2002-07-29 Thread Daniel Brunner

Yeah, it's asked a lot!!

And I've always answered that question( it's not the only question I 
answer!!! )


But Good Luck!! And your welcome!!!


Dan


On Monday, July 29, 2002, at 10:51 PM, [EMAIL PROTECTED] wrote:

 why, is this question asked a lot??? anywa, thanks, i was gonna try
 something like that from something i read in the mysql manual, but it 
 only
 mentioned it passing and didnt give an example or anything.

 tanx

 Daniel Brunner [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Once again...


 ALTER TABLE table1 AUTO_INCREMENT = 500


 Dan



 On Monday, July 29, 2002, at 10:44 PM, [EMAIL PROTECTED] wrote:

 rite,

 my primary key column (id) is set to auto_increment as usual which 
 is
 very
 handy. But when I delete a row, the auto_increment just keeps
 incrementing
 and there's this 'hole' left where I deleted the row!

 Apart from this looking ugly, it poses another problem. In my PHP 
 script
 where I can add new rows, I query the table, checking how many rows in
 the
 table altogether and set the new id as the next number, but this 
 doesnt
 work
 if theres 'holes' in the id field, as the new record tries to 
 overwrite
 another id.

 So I've 2 questions
 1) Can the next auto_increment value be 'set' by a SQL query
 2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in
 the ID
 column??

 TIA



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] PhpmyAdmin from external computers

2003-12-04 Thread Daniel Brunner
Hello!!

You need change your Usernames' host to your IP or simply change it 
to % (Any host).

This is all changed in MYSQL.

Good Luck!!



Dan



On Dec 4, 2003, at 9:36 AM, [EMAIL PROTECTED] wrote:

Hello Andy,

Thursday, December 4, 2003, 3:27:11 PM, you wrote:

AL Im afraid ive already tried that.

Are you sure your MySQL server is actually configured to ALLOW someone
to login remotely? I know most of the ones I work with aren't. This
isn't a setting you'll find in phpMyAdmin btw. Most MySQL servers are
locked down in this way for (very good) security reasons, to the point
that it wouldn't surprise me if this wasn't the default after
installation (I don't know for sure it is though).
--
Best regards,
 Richardmailto:[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Uploading files

2004-02-27 Thread Daniel Brunner
Hello,

Are you uploading files into MYSQL or any other DB??

Or are you uploading the files to a directory and inserting the 
location of the file in the database??



Dan

On Feb 27, 2004, at 3:19 PM, [EMAIL PROTECTED] wrote:

Pavel my form works fine with files  1M

- Original Message -
From: Pavel Lobovich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: PHP-mailist [EMAIL PROTECTED]
Sent: Friday, February 27, 2004 6:50 PM
Subject: Re: [PHP-DB] Uploading files

If your on a slow connection, it might be timing out.

Try putting:

set_time_limit(0);

At the top of the page where the file is being uploaded to (not 
from),
and see if that helps.
You dont have to do it. Script execution will not start before all
posted files are uploaded. If your browser refuses a connection and
sends Server not found then check your form (especially action
attribute ).
Sorry for my english.

Pavel.





On Fri, 2004-02-27 at 10:29, nikos wrote:
It is allready 8M

- Original Message -
From: Adam Voigt [EMAIL PROTECTED]
To: nikos [EMAIL PROTECTED]
Cc: PHP-mailist [EMAIL PROTECTED]
Sent: Friday, February 27, 2004 5:13 PM
Subject: Re: [PHP-DB] Uploading files

Your max post size needs to be upped to, try making it 6M and see 
if
that makes a difference.

On Fri, 2004-02-27 at 10:05, nikos wrote:
Hello list

Allthough I set my PHP.in upload_max_file=4M my system refused to
upload
files bigger than 1M and the browser send an server not found
error.
Does anybody know anything about that?
Thank you
--

Adam Voigt
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--

Adam Voigt
[EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Re: mail() function and AOL users

2004-05-19 Thread Daniel . Brunner
Hello!!

That's not always true.

I just sent mail using php to my AOL account, and it worked. The smtp 
mail server doesn't have a reverse dns lookup. 

His problem might be that the SMTP server he is using my be on the black 
list.

http://www.ordb.org/

This will cause a ton of problems.


It took me 3 weeks to get off that list!!!



Anyway...


Instead of sending it like this...

mail($email, application submitted, $message, From: 
[EMAIL PROTECTED]);


Do something like this...


$text = stripslashes($text);
$subject = stripslashes($sub);

$header = From: $From\nReply-To: $From\n;
$header .= Cc: $cc\n;
$header .= MIME-Version: 1.0\n;
$header .= Content-Type: text/plain\n;
$header .= Content-Transfer-Encoding: 8bnoit\n\n;
$header .= $text\n;

mail($To, $subject, , $header);


I alwasy like working with strings


Dan



-Original Message-
From: RJameson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 9:12 AM
To: php-db
Subject: RE: [PHP-DB] Re: mail() function and AOL users


I'm quite sure it's not a problem with the mail function. It's probably
the reverse dns configuration on your SMTP/sendmail server. AOL 
Verizon have been two real sticklers for that.

If you know the IP address that your server is sending the email from
you can use this:

http://www.dnsstuff.com/tools/ptr.ch?ip=YOURIPADDRESS

To check the revers dns resolution. You may be surprised.

 Ryan 

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 10:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: mail() function and AOL users

Hello,

On 12/12/2003 04:34 AM, Matt Perry wrote:
 I use the following php mail function in an online applicaiton
program:
 
 mail($email, application submitted, $message, From: 
 [EMAIL PROTECTED]);
 
 This function does not always work when I modify $message.  I have 
 checked for null values for $message already but this does not seem to

 be the problem.
 I am trying to develop some sort of pattern of when this function 
 works and when it does not.
 The only essential difference between the values I pass in for message

 is the one that does not always work includes a link.  Apparently 
 anyone useing AOL email is particularly vulnerable to this problem.
 
 Is it likely that AOL and other mail servers sometimes block any email

 from a web site if it has a link in the main body?  Or should I not be

 useing mail() in this manner to begin with?

Maybe you are not generating the message headers and body properly. 
Without seeing the code that you use to define $message, it is hard to
tell.

I just suggest that you try this class to properly compose and send your
messages:

http://www.phpclasses.org/mimemessage


-- 

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file

2004-05-24 Thread Daniel . Brunner
You could just use MysqlODBC, and import the data right into the excel 
sheet. 

Just setup a DNS that points to your Mysql server, on the windows box, 
then select Data-Get External data-New Database Query within Excel... 

I'm not sure what the data is, or why you need the data, or what your 
really doing

But that might be in option...


Cheers!!

Dan



-Original Message-
From: roehr [mailto:[EMAIL PROTECTED]
Sent: Monday, May 24, 2004 9:47 AM
To: php-db
Subject: Re: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file


[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
...
 Thanks for responding, Torsten. If I'm understanding your suggestion, 
then
 what happens where the data from the dB already has a ; (semi-colon) 
in
 it? Wouldn't this corrupt the import into excel?

This might cause a problem because Excel will start a new row then - 
this
could also happen with a tab delimiter. At the moment I can't think of a
solution for this. Is it probable that your data contains semicolons?

Regards, Torsten

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2004-08-12 Thread Daniel Brunner
Did you get this one??
On Aug 12, 2004, at 2:02 PM, [EMAIL PROTECTED] wrote:
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)
Dan Brunner
Web Software Developer/IT Support
Duni Supply Corporation
www.duni.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] MySQL to EXCEL?

2004-08-17 Thread Daniel Brunner
I don't know how you have it setup.
But you can create a XLS file on the fly using PHP
By using header...
header(Content-Type: application/vnd.ms-excel);
header(Content-Dispostion: attachemnt; filename='Project.xls');
header(Pragma: no-cache);
header(Expires: 0);
Then just echo your results from your query, like normal...
You have just created a XLS from PHP...Which can be saved to a XLS 
Workbook...


Dan



On Aug 17, 2004, at 4:33 PM, [EMAIL PROTECTED] wrote:
I have another option that might work for you also.  Go to MySQL's 
website
and grab their ODBC driver and use that to pull data directly into 
Excel.
That's what I do and the end result tends to be a lot cleaner than 
going
through cvs or other MySQL exports.
I was not sure that this was a mysql db.
sorry for the second email, I see now in the subject of the email it
is mysql, stupid me.
You could also try an excel com object to do this.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Daniel Brunner
What determines the gaps???
On Oct 5, 2004, at 12:59 PM, [EMAIL PROTECTED] wrote:
OK.  The problem is I don't want the next highest number.
There are gaps in the UID sequence.  I need to find the next UNUSED
number in the sequence which is rarely the highest number.
Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.com

-Original Message-
From: Bastien Koert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 05, 2004 12:45 PM
To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Auto-increment questions...
If its an autoincrement, the next highest number will be assigned by  
the
db.
There is no need to query the db to find it. Simply insert the record
and
leave the id field out of the insert statement.

bastien

From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Auto-increment questions...
Date: Tue, 5 Oct 2004 11:58:41 -0500
	I am working on a database application for Unix user accounts.
I want to be able to have a system that will provide me the next
available numeric user ID.  I have created a 2 column index table that
simply includes UID and user name.  This field is autoincrement and  
the
primary key for the table.  Currently this field only contains a very
small sample of users.  Basically, I have numeric IDs 3000, 3001,  
3008,
and 3028.  My problem is that I am not sure how to query this table to
get the next available numeric ID which is 3002.  If I do an insert
into
this table without specifying a value for the auto_increment column it
comes up with 3029.  Is there a way to query and/or insert such that  
it
comes up with the next unused numeric value?

Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Scan and help eliminate destructive viruses from your inbound and
outbound
e-mail and attachments.
http://join.msn.com/?pgmarket=en-capage=byoa/ 
premxAPID=1994DI=1034SU
=http://hotmail.com/encaHL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN(r) Premium right now and get
the
first two months FREE*.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php