[PHP-DB] MSSQL: Spaces in database name

2001-08-08 Thread Robert D. Young
How can I get mssql_select_db to accept a database name with spaces in it? For example, this: ... stuff $dbname = Test Database; ... more stuff mssql_select_db($dbname); doesn't work. But if I change to a database with no space in the name (like Test_Database) it works fine. Other apps

RE: [PHP-DB] MSSQL: Spaces in database name

2001-08-08 Thread Beau Lebens
i noticed in teh sql of working with some apps that it does things like [Test Database].fieldname that might work :) HTH Beau // -Original Message- // From: Robert D. Young [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 8 August 2001 2:39 PM // To: '[EMAIL PROTECTED]' // Subject:

[PHP-DB] Re: mysql errors....

2001-08-08 Thread Soeren Nielsen
Brian Weisenthal [EMAIL PROTECTED] wrote in message im going to go insane..i cant see my errors I surpose you have tried to echo mysql_error(); Right after your query. Regards, Søren Nielsen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

[PHP-DB] Error checking and escaping before running a query (MySQL)

2001-08-08 Thread Dave Watkinson
Hi all I have a searchbox that throws a wobbly when certain characters are entered into it - basically the user is supposed to enter a space-delimited list of words to search for, and then I create an array from it and turn it into an OR etc query. What I initially did was replace all commas

RE: [PHP-DB] Error checking and escaping before running a query (MySQL)

2001-08-08 Thread Beau Lebens
Dave, sounds like you are on the right track, but rather than use the comparatively bulky regular expression engine, why not just the light-weight string function str_replace( ,, , $searchbox ); (see String Functions in the manual) and you should be able to do str_replace( \, , $searchbox

RE: [PHP-DB] Error checking and escaping before running a query (MySQL)

2001-08-08 Thread Dave Watkinson
Wicked! Thanks Beau - it's not quite there but it's better than errors and timeouts all over the place! I'll keep playing with it - thanks again! Dave -Original Message- From: Beau Lebens [mailto:[EMAIL PROTECTED]] Sent: 08 August 2001 08:28 To: Dave Watkinson; PHP-DB List (E-mail)

[PHP-DB] record deletion using checkbox array values

2001-08-08 Thread Karl Phillipson
Morning people, I have a form with checkbox values, if checked an array of id's are passed to a deletion script. I can get the array and implode to a string. Can anyone tell me how to delete all the messages in the DB that have the checked value. Presently the script is deleting only the

RE: [PHP-DB] record deletion using checkbox array values

2001-08-08 Thread Michael Rudel
Hi Karl, $delete = ' . implode( ', ', $delete_list ); $delete = substr( $delete, 0, ( strlen( $delete ) - 3 ) ); then use: DELETE FROM sent_items WHERE id IN ($delete) Not tested, but should work. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am

RE: [PHP-DB] record deletion using checkbox array values

2001-08-08 Thread Karl Phillipson
Thanks for all that gave help on this one, problem finally solved! *mops forehead* Easy when you know how! on the form side: input type=\checkbox\ name=\delete_list[]\ value=\$messid\ script page: $delete = implode(,, $delete_list); if(!($result = mysql_db_query($DB, DELETE FROM

[PHP-DB] LDAP and special chars

2001-08-08 Thread Christian Chateauvieux
Hello, I am working with PHP 4.0.6 and OpenLDAP 2.0.11. I encounter problems when modifying some entries with attributes containing special chars (such as å, ø...). The error returned by the LDAP server is invalid syntax. I have read some documentation about this. OpenLDAP can accept

[PHP-DB] AW: How to tell if a mysql table is locked

2001-08-08 Thread Oliver Borgers
smime.p7m

[PHP-DB] DB Compaction Algorithm

2001-08-08 Thread Ben Bleything
Hello all... I'm going to propose an algorithm to compact a MySQL database containing information that I'll talk about shortly. I'm curious what you all think about it. Nevermind the various reasons why I should/should not do this, as I have weighed them in my head and decided that it's

[PHP-DB] ranking database searches

2001-08-08 Thread Michael Hall
This may be more trouble than I'm interested in, but I'm working on search functionality for a number of our MySQL database projects. I'm looking for ways (or just ideas about ways) to set up a ranking system such that I could have exact matches at the top of the list, then multiple partial

Re: [PHP-DB] ranking database searches

2001-08-08 Thread grant
2 ideas: 1) Define the loosest item that returns results (likely regex) then search with slightly tighter criteria within the results. Good for situations where even partial matches are a small percentage of the total data 2) Check every record, and give it a score based on proximity to the

[PHP-DB] Re: ranking database searches

2001-08-08 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Michael Hall) wrote: This may be more trouble than I'm interested in, but I'm working on search functionality for a number of our MySQL database projects. I'm looking for ways (or just ideas about ways) to set up a ranking system such that

[PHP-DB] Inseting info into MySQL and retrieving all in one SQL command

2001-08-08 Thread Scott Mebberson
Hi guys, I am adding some information to my MySQL database. It is user's information. So it has things like email address, password, username, all that sort of stuff. What I need to do is once I have added it found out the id - a primary key which auto increments itself. At the moment I am

RE: [PHP-DB] Inseting info into MySQL and retrieving all in one SQL command

2001-08-08 Thread Beau Lebens
not so much in one step, but once you have inserted it you can call the function mysql_insert_id(); and it will return the auto_increment value of the last insert operation. see the manual for more. HTH Beau // -Original Message- // From: Scott Mebberson [mailto:[EMAIL PROTECTED]] //

[PHP-DB] Re: Inseting info into MySQL and retrieving all in one SQL command

2001-08-08 Thread Scott Mebberson
Thanks, Beau. Great advice! Scott Mebberson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi guys, I am adding some information to my MySQL database. It is user's information. So it has things like email address, password, username, all that sort of stuff.

RE: [PHP-DB] MSSQL: Spaces in database name

2001-08-08 Thread Robert D. Young
That did it! Using: ... stuff $dbname = [Test Database]; ... more stuff mssql_select_db($dbname); worked perfectly. Again, Thanks! - Robert -Original Message- From: Beau Lebens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 11:46 PM To: 'Robert D. Young'; '[EMAIL

[PHP-DB] MS SQL connect by ODBC

2001-08-08 Thread Sommai Fongnamthip
Hi, Did someone ever connect PHP (on Linux box) to MS SQL (on NT box) via ODBC (iODBC or unixODBC)? How to config and writing code in PHP? thanks SF -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP-DB] semi newbie Q

2001-08-08 Thread Travis Cannell
Here is a quick question. Cane the mail() function handle file attachments? I couldnt find anything like that on the PHP reference but maybe someone knows out there. If not does anyone have any simple scripts that will allow me to do this? Cheers, T P K Cannell -- PHP Database Mailing List

RE: [PHP-DB] semi newbie Q

2001-08-08 Thread Beau Lebens
no it can't directly, but there are plenty of mail classes out there which will allow you to handle mime-types, attachments and other stuff. have a look on phpbuilder.com and phpclass.something? cant remember, run by a guy called manuel lemos if that helps... search for mail, and you should find

RE: [PHP-DB] MSSQL: Spaces in database name

2001-08-08 Thread Graeme Merrall
Quoting Robert D. Young [EMAIL PROTECTED]: That did it! Using: ... stuff $dbname = [Test Database]; ... more stuff mssql_select_db($dbname); worked perfectly. Again, Thanks! This is standard Microsoft (and maybe ODBC?) syntax. Using square brackets will work on most things

Re: [PHP-DB] semi newbie Q

2001-08-08 Thread Travis Cannell
Thanks for the advice. I found a good PHP mail class that does this but when i run the example all i get is a CGI error. It says The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: and thats it. I am running a windows 200

RE: [PHP-DB] semi newbie Q

2001-08-08 Thread Beau Lebens
sounds like you are running php as a cgi on IIS, suggestions; 1. run php as a module on apache :) (yes it works on win2k) 2. your code is incorrect, try doing some debugging throught your code (ie. echo $variables or something to make sure things are right) HTH // -Original Message- //

RE: [PHP-DB] MSSQL: Spaces in database name

2001-08-08 Thread Robert D. Young
Understood. Notice that almost all of the MS databases and tables (predefined and samples) have *no* space in them. I'd long ago forgotten the ODBC/SQL syntax (last time I used it was in 95), thanks for the reminder. - Robert (who likes to use human readable names wherever possible)