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
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:
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
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
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
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)
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
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
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
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
smime.p7m
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
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
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
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
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
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]]
//
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.
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
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
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
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
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
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
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-
//
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)
26 matches
Mail list logo