RE: [PHP-DB] Access to MySQL Conversion question
select max(idfield) from table > -Original Message- > From: Brad Harriger [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 18, 2001 7:32 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Access to MySQL Conversion question > > > I have several MS Access databases that I need to convert to MySQL. > Each table is indexed on an ID field. How do I find the last index > number in the existing table so that I can increment it for the next > record that is added? > > Thanks, > > Brad > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] RE: Excel to MySQL
You could try the MyODBC driver. On the www.mysql.com website I think. Then you won't need CSV or any other type of import file. Tony > -Original Message- > From: Mikusch, Rita [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 17, 2001 5:05 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] RE: Excel to MySQL > > > I do this fairly often (actually from MSSQL to Access to Excel to MySQL -- > I'm sure there's a shorter route!) > > I convert the Excel file to a tab delimited file. I do run into two > problems: > > a) some of the text entries are surrounded by double quotes and > some aren't > (some kind of Excel weirdness). So I open it up in a text editor > and delete > all the quotes. I use the "programmers file editor" which is > about a zillion > years old, hasn't been updated for years, but deletes those quotes in > milliseconds. > > b) sometimes users enter hard-returns into the text data they > enter into the > windows database (the source of my excel file). This will convert into a > hard return in your tab delimited text file. I run through the > list manually > to find the hard returns and delete them. My list is only 10,000 > long and it > is formatted in such a way that makes these hard returns easy to see! I'm > sure others on the list have a much better way of dealing with this. > > I have an "auto increment" field in my table so I add an > additional numbered > column in Excel and number it appropriately. > > One day when I have time I'll actually find a more efficient way of doing > all this! > > good-luck > rita. > > -Original Message- > From: Chris Payne [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 16, 2001 10:58 PM > To: [EMAIL PROTECTED] > Subject: Excel to MySQL > > > Hi there everyone, > > What is the best way to convert an Excel spreadsheet into a MySQL > database? > Should I save it as a comma'd file or is there a better way? If I have to > save it as a comma'd text file, is there anything special I > should do first? > > I would normally enter the data manually on my server, but we are > talking in > excess of 15000+ entries here which is way too many to add manually. > > Thanks for all your help. > > Chris > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] How to do this with PHP
Does anyone know how to achieve this using non-mysql servers? subqueries? -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 7:48 PM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] How to do this with PHP SELECT * FROM mytable LIMIT 0,5 SELECT * FROM mytable LIMIT 6,5 SELECT * FROM mytable LIMIT 11,5 SELECT * FROM mytable LIMIT 16,5 -Original Message- From: Alawi Albaity [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 1:44 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] How to do this with PHP I have a table .. this table have 20 record.. I want to view this record in the 4 pages (5 record by page).. how can I do that !! __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Store Procedures
on slashdot.org today... ;) http://software.tangent.org/article.pl?sid=01/08/23/0817244&mode=thread&threshold= MySQL Gets Perl Stored Procedures (Embedded image moved to file: pic22355.gif)Posted by CmdrTaco on Friday August 24, @11:52AM from the well-isn't-that-special dept. ryarger writes "Woo Hoo! After a seeming eternity of wait, there is finally an implementation of stored procedures for MySQL. It uses Perl as the stored proc language, too!" Also note that this piece of work was done by OSDNs own Krow. Very cool work I must say. ( Read More... | 155 of 221 comments ) Rick Emery , .com>"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> cc: 08/23/2001 Subject: RE: [PHP-DB] Store Procedures 10:08 PM no -Original Message- From: Francisco Carvalho [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 4:20 PM To: '[EMAIL PROTECTED]' Subject: [PHP-DB] Store Procedures Newbie question. I've been developing web application in IIS using ASP and Microsoft SQL Server 7.0. I use "Stored Procedures" quite extensible is there an equivalent in MySQL Thanks. Francisco Carvalho -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. Trinity Mirror plc is the holding company for the Trinity Mirror group of companies and is registered in England No. 82548, with its address at Kingsfield Court, Chester Business Park, Chester CH4 9RE. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For addition
RE: [PHP-DB] getting ID
With MSSQL I do: $result=mssql_query("select @@IDENTITY as 'jobNumber'"); $row=mssql_fetch_array($result); $insertid=$row[jobNumber]; May be similar for sybase.. I understand they have similar origins.. Tony "Walter, Marcel" To: 'Ian Grant' <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject: RE: [PHP-DB] getting ID 08/20/2001 11:22 AM Is there a similar function for a Sybase - Database ? > -Original Message- > From: Ian Grant [SMTP:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 12:20 > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] getting ID > > mysql_insert_id([resource link_identifier]) returns the value of the > auto_increment field for the previous INSERT query. It will return 0 if > there is not an auto_increment field. If the link_identifier is not > specified, the last opened connection is used. > > So, use $id = mysql_insert_id(); directly after your $result = > mysql_query($query); operation (where $query is an INSERT query) to pull > the > id value you have just auto inserted back out. > > > Ian. > > Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php > Crosswalkcentral <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I tried this and it gave me an error. > > > > Will this > > > > $id = mysql_insert_id(); > > > > allow me to pull out the id? > > > > > > -- > > Cross Walk Central > > www.crosswalkcentral.net > > Support Center > > Your Web Hosting Community! > > > > "Cynic" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > At 19:19 8/19/2001, CrossWalkCentral wrote the following: > > > -- > > > >I have a script where I submit user data to the database in my script > I > > need > > > >to get the id # how can I do this w/o creating a query that does the > > > >following considering that user could have 10 other entires. > > > > > > mysql_query("insert into ..."); > > > $id = mysql_insert_id(); > > > > > > > > > >// Request info > > > >$result = mysql_query( > > > >"SELECT * FROM supportsys WHERE email = $email"); > > > >if (!$result) { > > > >echo("Error performing query: " . > > > >mysql_error() . ""); > > > >exit(); > > > >} > > > > > > > > > > > >I basicly need to get the id$ of the record just entered > > > >-- > > > >Cross Walk Central > > > >www.crosswalkcentral.net > > > >Support Center > > > >Your Web Hosting Community! > > > > > > > > > > > > > > > > > > > >-- > > > >PHP Database Mailing List (http://www.php.net/) > > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > > --end of quote-- > > > > > > > > > [EMAIL PROTECTED] > > > - > > > And the eyes of them both were opened and they saw that their files > > > were world readable and writable, so they chmoded 600 their files. > > > - Book of Installation chapt 3 sec 7 > > > > > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all re
[PHP-DB] Querying active directory from PHP
Has anyone done anything with Windows 2000 Active Directory from PHP? I'd quite like to try this out but I haven't been able to get anything to work! To begin with I'd like to query basic attributes like user name, phone number, email address Any info/pointers whatsoever would be appreciated! Tony IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. Trinity Mirror plc is the holding company for the Trinity Mirror group of companies and is registered in England No. 82548, with its address at Kingsfield Court, Chester Business Park, Chester CH4 9RE. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Image Bank with php & mysql!! ??!!
To take it a step further, I would suggest creating a php script downloadimage.php as follows: Then link to that with Download Image Make sure the images are outside of your webservers document root. Then you can programatically decide whether to serve the image to the user. Removes the possibility of leeching the entire library.. Tony -- Tony McCrory IT, Trinity Mirror group (Ireland) (028) 9068 0168 [EMAIL PROTECTED] "Hugh Bothwell" cc: Subject: [PHP-DB] Re: Image Bank with php & mysql!! ??!! 07/30/2001 02:14 PM "Koutsogiannopoulos Karolos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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. http://www.hotscripts.com/PHP/Scripts_and_Programs/Image_Galleries/more2.htm l > What would be best.? Inserting the pictures in the DB or in the file system I would keep the image name in the database; save the original image in a dedicated directory with a numeric name like 4920185.jpg and then the thumbnail either with a suffix (like 4920185b.jpg) or with the same name in a thumbnails directory; store the number as the picture ID. The numbers should be large and pseudorandom, ie you don't want to make it easy for someone to write a script to leech all your pictures (it'll still be possible, but harder). Maybe use the database ID to seed a random number generator, and use the Nth generated number? Have a text field for keywords, a text field for description, a price field?, the author's name, email, and homepage. If you put the image directory below the web root directory, then the images can only be accessed via a script, and you can restore the original name at download (this solves the problem of name collisions). If you're going to sell the pictures, you should allow a buyer more than one download, in case they screw up or accidentally delete it on their system; I would have a table for 'current purchases' with a buyer ID and picture ID, and allow them something like access for a week, up to 20 downloads of that image. > ? Also notice that it is a reference db and not an actual bank. I mean that > there will be only photos of low quality and not the full picture which > could be very large. (shrug) as above, keep the images in the filesystem; then it doesn't matter how large it is. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. Trinity Mirror plc is the holding co
Re: [PHP-DB] Issue with MSSQL_QUERY()
sorry bum info in my last post, it should have read $id=mssql_query("select @@IDENTITY as 'taskid'"); $result=mssql_fetch_array($id); $taskid=$result[taskid]; Tony tony.mccrory@ mgn.co.ukTo: Ryan Marrs <[EMAIL PROTECTED]> cc: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 07/03/2001 Subject: Re: [PHP-DB] Issue with MSSQL_QUERY() 08:25 PM With mysql you can do mysql_insert_id. The following code should do what you need in mssql. $query="InsertRequest '1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1 4','15',''; $return=MSSQL_QUERY($query); $id=mssql_query("select @@IDENTITY as 'taskid'"); $taskid=mssql_fetch_array($id); $taskid will then be whatever mssql set your identity/autoincrement field to be. Regards, Tony -- Tony McCrory IT, Trinity Mirror group (Ireland) (028) 9068 0168 [EMAIL PROTECTED] Ryan Marrs ade.com> cc: Subject: [PHP-DB] Issue with MSSQL_QUERY() 07/03/2001 08:14 PM I've run into an issue using MSSQL_QUERY() that I cannot seem to figure out a work-around for. The last field in the query is an auto-increment starting at 100,000. I need the MSSQL_QUERY($query) statement to print out the result of the query (which is a stored procedure in case that wasn't obvious). Instead it returns True (1) or False (0?). Does anyone have suggestions? I am completely stumped at this point. Thanks! Ryan $query="InsertRequest '1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1 4','15',''; $return=MSSQL_QUERY($query); $taskid=$return; -RESULT - $taskid = 1 IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. Trinity Mirror plc is the holding company for the Trinity Mirror group of companies and is registered in England No. 82548, with its address at Kingsfield Court, Chester Business Park, Chester CH4 9RE. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all res
Re: [PHP-DB] Issue with MSSQL_QUERY()
With mysql you can do mysql_insert_id. The following code should do what you need in mssql. $query="InsertRequest '1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1 4','15',''; $return=MSSQL_QUERY($query); $id=mssql_query("select @@IDENTITY as 'taskid'"); $taskid=mssql_fetch_array($id); $taskid will then be whatever mssql set your identity/autoincrement field to be. Regards, Tony -- Tony McCrory IT, Trinity Mirror group (Ireland) (028) 9068 0168 [EMAIL PROTECTED] Ryan Marrs ade.com> cc: Subject: [PHP-DB] Issue with MSSQL_QUERY() 07/03/2001 08:14 PM I've run into an issue using MSSQL_QUERY() that I cannot seem to figure out a work-around for. The last field in the query is an auto-increment starting at 100,000. I need the MSSQL_QUERY($query) statement to print out the result of the query (which is a stored procedure in case that wasn't obvious). Instead it returns True (1) or False (0?). Does anyone have suggestions? I am completely stumped at this point. Thanks! Ryan $query="InsertRequest '1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1 4','15',''; $return=MSSQL_QUERY($query); $taskid=$return; -RESULT - $taskid = 1 IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. Trinity Mirror plc is the holding company for the Trinity Mirror group of companies and is registered in England No. 82548, with its address at Kingsfield Court, Chester Business Park, Chester CH4 9RE. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]