[PHP-DB] access denied
Warning: MySQL Connection Failed: Access denied for user: 'rehab@localhost' (Using password: YES) in /home/sites/site92/web/mall/confirmregistration.php on line 14 Error connecting to host localhost, by user rehab should i use this: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON mall.* TO rehab@localhost IDENTIFIED BY 'mall'; or what??? and how should i write this grant statment??? just put it there or like: mysql_query(grant select...)??? -- 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-DB] ELF Header problem
Hi, Please check out the following error. Unable to load dynamic library './php_imap.dll' - ./php_imap.dll: invalid ELF header in config.php on line 3 I have loaded the php_imap.dll at runtime using the dl() function. Can anyone tell me the reason for this error and how to solve it. Thanx, Vipin Samsan Exports. -- 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-DB] sybase remote procedure ergebnis in variable
Hallo, ich nutze per ODBC eine remote procedure auf einem Sybase Server. Die Prozedur liefert mir unter anderem eine Variable zurück, die ich in PHP weiternutzen muß. Kann mir jemand einen Hinweis geben, wie ich die Variable der ODBC Abfrage in eine PHP Variable übertragen kann? Hier das Beispiel: odbc_exec ($conn,declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output); @VARIABLE soll übertragen werden in $VARIABLE Danke im voraus 7k -- 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-DB] sybase remote pocedure into variable
Hi, I run a remote procedure via ODBC on a sybse server. The procedure returns an integer in a variable @VARIABLE. I have to use the integer as a variable $VARIABLE in PHP. Does anybody know how to get the content of @VARIABLE into $VARIABLE? This is the code I use: odbc_exec ($conn,declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output); content of @VARIABLE must be written into $VARIABLE Thanks in advance 7k -- 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] sybase remote procedure ergebnis in variable
anyone who can translate this? Met vriendelijke groet, Michiel Lange ActuEra B.V. 7k stefan.siebenkittel@contr To: [EMAIL PROTECTED] olware.de cc: Fax to: 19-09-2001 12:50 Subject: [PHP-DB] sybase remote procedure ergebnis in variable Hallo, ich nutze per ODBC eine remote procedure auf einem Sybase Server. Die Prozedur liefert mir unter anderem eine Variable zurück, die ich in PHP weiternutzen muß. Kann mir jemand einen Hinweis geben, wie ich die Variable der ODBC Abfrage in eine PHP Variable übertragen kann? Hier das Beispiel: odbc_exec ($conn,declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output); @VARIABLE soll übertragen werden in $VARIABLE Danke im voraus 7k -- 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-DB] Sybase Stored Procedure, return content
hello ! I have a problem, My SP does not return anything neither to Sybase Interactive SQL nor to PHP. When i use to try it from Sybase Central it adds me to may Query "Select [var] from DUMMY" after execuring procedure. What should I do to recive the contents directly from Stred Proced. ? Thank you.
Re: Antw: Re: [PHP-DB] sybase remote procedure ergebnis in variable
Missed that... Try these: $VARIABLE = odbc_exec(...) or try what $@VARIABLE contains... Met vriendelijke groet, Michiel Lange ActuEra B.V. Stefan Siebenkittel Stefan.Siebenkittel@contr To: [EMAIL PROTECTED] olware.de cc: Fax to: 19-09-2001 13:55 Subject: Antw: Re: [PHP-DB] sybase remote procedure ergebnis in variable Hi, I posted my question separately in english too: Hi, I run a remote procedure via ODBC on a sybse server. The procedure returns an integer in a variable @VARIABLE. I have to use the integer as a variable $VARIABLE in PHP. Does anybody know how to get the content of @VARIABLE into $VARIABLE? This is the code I use: odbc_exec ($conn,declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output); content of @VARIABLE must be written into $VARIABLE Thanks in advance 7k [EMAIL PROTECTED] 09/19 1:30 anyone who can translate this? Met vriendelijke groet, Michiel Lange ActuEra B.V. 7k stefan.siebenkittel@contr To: [EMAIL PROTECTED] olware.de cc: Fax to: 19-09-2001 12:50 Subject: [PHP-DB] sybase remote procedure ergebnis in variable Hallo, ich nutze per ODBC eine remote procedure auf einem Sybase Server. Die Prozedur liefert mir unter anderem eine Variable zurück, die ich in PHP weiternutzen muß. Kann mir jemand einen Hinweis geben, wie ich die Variable der ODBC Abfrage in eine PHP Variable übertragen kann? Hier das Beispiel: odbc_exec ($conn,declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output); @VARIABLE soll übertragen werden in $VARIABLE Danke im voraus 7k -- 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-DB] Re: sybase remote pocedure into variable
Good idea Michiel, I tried $@VARIABLE but it doens't work (not content). Concerning the other idea, as far as I know the odbc procedure only returns if it has run successfull or not and thus gives me a 0 or a 1 if use: $VARIABLE=odbc_exec ($conn,declare @VARIABLE int exec PROZEDURNAME 'TABELLENNAME_SPALTENNAME', @VARIABLE output); Any other ideas? Ciao 7k Michiel Lange wrote: Missed that... Try these: $VARIABLE = odbc_exec(...) or try what $@VARIABLE contains... Met vriendelijke groet, Michiel Lange ActuEra B.V. -- 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-DB] Re: access denied
check your mysql user table make sure your login has the permission to GRANT -- Hidulf http://www.hidulf.com Its Me [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Warning: MySQL Connection Failed: Access denied for user: 'rehab@localhost' (Using password: YES) in /home/sites/site92/web/mall/confirmregistration.php on line 14 Error connecting to host localhost, by user rehab should i use this: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON mall.* TO rehab@localhost IDENTIFIED BY 'mall'; or what??? and how should i write this grant statment??? just put it there or like: mysql_query(grant select...)??? -- 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-DB] Re: php + MYSQL based banner exchange system
they have something you need http://phpwizard.net -- Hidulf http://www.hidulf.com Andrius Jakutis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello all, I need your recomendations, where to download from a good (profesional - many options) banner exchange system (subj.). I need it for free (I understand that not everything what is free is also good :) ). Any ideas? Sorry, if my message is offtopic. Sincerely, Andrius -- 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-DB] Renaming a database name...
Dear All... Can I rename a database name ? Regards rief -- 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] Cookies ???
He's not trying to set multiple cookies...only one. -Original Message- From: Mark Collin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 4:01 PM To: Rick Emery; 'Jason Caldwell'; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Cookies ??? instead of setting multiple cookies, why not start using seassions its dead easy with php4 and you can then do all your security stuff with sessions, much easier, much more secure etc - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Jason Caldwell' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, September 17, 2001 6:29 PM Subject: RE: [PHP-DB] Cookies ??? Q1. If you simply wish to READ the cookie from each web page, you need do nothing. It is created atuomatically as a variable for you. For instance, a cookie named mycookie is available as $mycookie. Q2. The Cookie Path is the reference point on the web server. I creates a context for the cookie. It allows the cookie to be read when a web page comes from that specific directory. If you want it to be available from all directories, use /. Q3. The cookie can store multiple values that you concatenate together. For instance, to store username/password: setcookie( cookiename, $user#$password, time()+3600, /, .mydomain.com ); Then, upon reading the cookie: list($user,$password) = explode( #, $cookiename ); FYI...setcookie() has worked for me on IE 5.x and NN 5.x. -Original Message- From: Jason Caldwell [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Cookies ??? I've been reading the threads under SETCOOKIE (from php.net) -- some people are saying that setcookie doesn't seem to work for all browsers all of the time. Then some others go into how it seems to actually be the TIME format (unix time vs. GMT time) -- Should I just stick to the HEADER version instead of setcookie? Also -- I'm not completely clear on how cookies work in the first place... Q1: When I set a cookie, is that cookie automatically called from *each* page on my website? Or, do I need to add the HEADER to each page where I want to call the cookie? Q2: The 'Cookie Path' -- is this the PATH on my websever -- someone please explain what this is exactly, and how it works. Q3: The scenario I would like to use cookies in is to have users automatically be logged in when they come to my home page... so I will need to store the Username and Password in the cookie... should I store these in an Array, or can I create multiple cookies -- in other words, a cookie can only store one value, correct? So, I can use Serialize / Unserialize to store Array information in my cookies? Thanks. Jason -- 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]
[PHP-DB] Query construction
Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] Query construction
When you printed-out the string variable containing the SELECT statement, what did it look like? -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query construction Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] Renaming a database name...
On Thu, Sep 20, 2001 at 05:04:37AM +0700, Arief Fajar Nursyamsu wrote: Can I rename a database name ? I don't know what database you are using, but you should be able to do something like this with most of them. Do a backup of the database. Create a new database with the new name. Restore the old database to the new database. -- Jason Stechschulte [EMAIL PROTECTED] -- Beauty? What's that? -- Larry Wall in [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] uploading and stuff
Did you look at Chapter 19 of the PHP manual? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 8:54 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] uploading and stuff Hello there... I want to upload textfiles and store them in my TEXT type field in my postgres database. So in my html form I have this entry: input type = file name = uploader (and whatever else I had to put there) the script I wanted to upload the file, but somehow it does not seem to do that: I use the rename() function, but that apparently does not upload the file. Can you tell me what I am doing wrong? what the prerequisites are for the client that is uploading, etc? After the file is uploaded btw, I planned to say $data=file($inputfile) and then a query like $query = INSERT INTO table (data) VALUES \'$data\'; pg_exec($database,$query); and that should do the trick... but it is not working yet *sniff* please tell me what I am missing... (the uploaded file, but the books I have about php are quite unclear about uploading) Met vriendelijke groet, Michiel Lange ActuEra B.V. -- 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] uploading
PHP manual, chapter 19 -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 8:27 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] uploading i want the user to upload files to server when i worked offline i used to write: $updir = C:\apache\htdocs\mall\logos; as logos folder is where i put the files(logos) all my files is in a folder called mall and inside the mall folder there is the logos folder. what should be the equivilant of the actual server(in uploading sure this path isn't working) ? -- 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: RE: [PHP-DB] Query construction
If you mean did the pattern I'm trying to match: $team, contain what I though it should: 'footballSat' then yes it did. I also receieve no error message from MySQl The string in the table field I can view/alter in phpMyAdmin and I've tried matching $team in the query to the string as: footballSatfootballSun (etc etc) and also as: footballSat footballSun (etc etc).. Any ideas?? Many thanks. Russ On Wed, 19 Sep 2001 09:12:36 -0500 Rick Emery [EMAIL PROTECTED] wrote: When you printed-out the string variable containing the SELECT statement, what did it look like? -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query construction Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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: RE: [PHP-DB] Query construction
$query = SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+' print $query what were the contents of $query -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:19 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction If you mean did the pattern I'm trying to match: $team, contain what I though it should: 'footballSat' then yes it did. I also receieve no error message from MySQl The string in the table field I can view/alter in phpMyAdmin and I've tried matching $team in the query to the string as: footballSatfootballSun (etc etc) and also as: footballSat footballSun (etc etc).. Any ideas?? Many thanks. Russ On Wed, 19 Sep 2001 09:12:36 -0500 Rick Emery [EMAIL PROTECTED] wrote: When you printed-out the string variable containing the SELECT statement, what did it look like? -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query construction Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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: RE: RE: [PHP-DB] Query construction
I'm sorry but I must be missing something fundamental here. This is how my code looks, and if the SQL query yields nothing and emits no error (as it currently is) it simply reverts to error.php: $sql = SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; $result = mysql_query($sql, $connection) or die(mysql_error()); $num = mysql_num_rows($result); //User hasn't been found in DB with current details: if ($num == 0) { header(Location: error.php?err=n_player); exit; } else { while($row = mysql_fetch_array($result)) { etc etc Cheers again: Russ On Wed, 19 Sep 2001 09:26:07 -0500 Rick Emery [EMAIL PROTECTED] wrote: $query = SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+' print $query what were the contents of $query -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:19 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction If you mean did the pattern I'm trying to match: $team, contain what I though it should: 'footballSat' then yes it did. I also receieve no error message from MySQl The string in the table field I can view/alter in phpMyAdmin and I've tried matching $team in the query to the string as: footballSatfootballSun (etc etc) and also as: footballSat footballSun (etc etc).. Any ideas?? Many thanks. Russ On Wed, 19 Sep 2001 09:12:36 -0500 Rick Emery [EMAIL PROTECTED] wrote: When you printed-out the string variable containing the SELECT statement, what did it look like? -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query construction Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] Query construction
Usually what I do when I'm having this type of problem is put the whole sql statement into a string variable then print the variable out just before running the query so you know exactly what's being sent to mysql. Then I log into mysql from the command line and enter the query manually to see what sort of response or error message I get. -Steve On Wednesday, September 19, 2001, at 09:01 AM, Russ Michell wrote: Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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: RE: RE: [PHP-DB] Query construction
You've created $sql. Good. Print it...display it...show its contents... Does it contain the TEXT that you expect? Copy and paste it to the mysql command line in mysql. -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:33 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: RE: [PHP-DB] Query construction I'm sorry but I must be missing something fundamental here. This is how my code looks, and if the SQL query yields nothing and emits no error (as it currently is) it simply reverts to error.php: $sql = SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; $result = mysql_query($sql, $connection) or die(mysql_error()); $num = mysql_num_rows($result); //User hasn't been found in DB with current details: if ($num == 0) { header(Location: error.php?err=n_player); exit; } else { while($row = mysql_fetch_array($result)) { etc etc Cheers again: Russ On Wed, 19 Sep 2001 09:26:07 -0500 Rick Emery [EMAIL PROTECTED] wrote: $query = SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+' print $query what were the contents of $query -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:19 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction If you mean did the pattern I'm trying to match: $team, contain what I though it should: 'footballSat' then yes it did. I also receieve no error message from MySQl The string in the table field I can view/alter in phpMyAdmin and I've tried matching $team in the query to the string as: footballSatfootballSun (etc etc) and also as: footballSat footballSun (etc etc).. Any ideas?? Many thanks. Russ On Wed, 19 Sep 2001 09:12:36 -0500 Rick Emery [EMAIL PROTECTED] wrote: When you printed-out the string variable containing the SELECT statement, what did it look like? -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query construction Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com
RE: [PHP-DB] Query construction
YES!!! Exactly Russ...do what Steve syas... -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:32 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query construction Usually what I do when I'm having this type of problem is put the whole sql statement into a string variable then print the variable out just before running the query so you know exactly what's being sent to mysql. Then I log into mysql from the command line and enter the query manually to see what sort of response or error message I get. -Steve On Wednesday, September 19, 2001, at 09:01 AM, Russ Michell wrote: Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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: RE: [PHP-DB] Query construction
Ok ok ok!! Thank you both for the pointers, they did of course yield the problem - as bloody always it's something completely different! As my old-dad always says: Everything is about something else (although this was always meant in a psychiatrist-patient relationship..) Thank you again both, and I apologise for seemingly wasting your time, but I do value people's ideas and opinions, and hopefully others do of mine also. Regards: Russ Michell (APU Webteam) On Wed, 19 Sep 2001 09:41:47 -0500 Rick Emery [EMAIL PROTECTED] wrote: YES!!! Exactly Russ...do what Steve syas... -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:32 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query construction Usually what I do when I'm having this type of problem is put the whole sql statement into a string variable then print the variable out just before running the query so you know exactly what's being sent to mysql. Then I log into mysql from the command line and enter the query manually to see what sort of response or error message I get. -Steve On Wednesday, September 19, 2001, at 09:01 AM, Russ Michell wrote: Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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: RE: [PHP-DB] Query construction
It wasn't a waste of time. Now, the next time you have a similar problem with a mySQL query, you'll follow this procedure. Learning is NEVER a waste of time... p.s. Your father is a psychiatrist??? Now, there, I could use some help... -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:56 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction Ok ok ok!! Thank you both for the pointers, they did of course yield the problem - as bloody always it's something completely different! As my old-dad always says: Everything is about something else (although this was always meant in a psychiatrist-patient relationship..) Thank you again both, and I apologise for seemingly wasting your time, but I do value people's ideas and opinions, and hopefully others do of mine also. Regards: Russ Michell (APU Webteam) On Wed, 19 Sep 2001 09:41:47 -0500 Rick Emery [EMAIL PROTECTED] wrote: YES!!! Exactly Russ...do what Steve syas... -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:32 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query construction Usually what I do when I'm having this type of problem is put the whole sql statement into a string variable then print the variable out just before running the query so you know exactly what's being sent to mysql. Then I log into mysql from the command line and enter the query manually to see what sort of response or error message I get. -Steve On Wednesday, September 19, 2001, at 09:01 AM, Russ Michell wrote: Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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: RE: RE: [PHP-DB] Query construction
Learning is NEVER a waste of time... No, of course not, but having been on these lists for sometime, I get the feeling some people (as I would, and do) get pi**ed off if someone doesn't at least try first before asking questions.. p.s. Your father is a psychiatrist??? Now, there, I could use some help... No he isn't he just thinks he is ;-) Many thanks. Russ On Wed, 19 Sep 2001 10:01:07 -0500 Rick Emery [EMAIL PROTECTED] wrote: It wasn't a waste of time. Now, the next time you have a similar problem with a mySQL query, you'll follow this procedure. Learning is NEVER a waste of time... p.s. Your father is a psychiatrist??? Now, there, I could use some help... -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:56 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction Ok ok ok!! Thank you both for the pointers, they did of course yield the problem - as bloody always it's something completely different! As my old-dad always says: Everything is about something else (although this was always meant in a psychiatrist-patient relationship..) Thank you again both, and I apologise for seemingly wasting your time, but I do value people's ideas and opinions, and hopefully others do of mine also. Regards: Russ Michell (APU Webteam) On Wed, 19 Sep 2001 09:41:47 -0500 Rick Emery [EMAIL PROTECTED] wrote: YES!!! Exactly Russ...do what Steve syas... -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:32 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query construction Usually what I do when I'm having this type of problem is put the whole sql statement into a string variable then print the variable out just before running the query so you know exactly what's being sent to mysql. Then I log into mysql from the command line and enter the query manually to see what sort of response or error message I get. -Steve On Wednesday, September 19, 2001, at 09:01 AM, Russ Michell wrote: Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password') AND affil_team RLIKE '$team+'; (I've also tried: RLIKE '$team?' ) This should match the string found in the variable: '$team' with the some of contents (string) found in 'affil_team'. For example my test has been, trying to find 'footballSat', so $team = 'footballSat'. 'footballSat' exists as part of the string in the 'affil_team' field but the above query refuses to find 'footballSat'!! (No error is received though) I'm using MySQL 3.22.32 + php4.0.3pl1 Cheers Russ #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com
[PHP-DB] Re: Renaming a database name...
There is an excellent set of functions called dbUtils that takes care of this type of thing. You can get it from www.SiteCreative.com - Jonathan Arief Fajar Nursyamsu [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear All... Can I rename a database name ? Regards rief -- 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-DB] Re: log out
Try: ?php session_start() ; session_destroy() ; header(Location: http://$HTTP_HOST/mall/menu.php;) ; ? You need to capitalize the 'L' in Location (HTTP headers are case-sensitive). HTH, Colter Reed On 9/12/01 5:54 AM, in article [EMAIL PROTECTED], Its Me [EMAIL PROTECTED] wrote: ?php session_start(); session_destroy(); header(location:http://$HTTP_HOST/mall/menu.php;); ? i wanna make this my log out page. it works without the: header(location:http://$HTTP_HOST/mall/menu.php;); i tried to put it befor session_destroy() but still didn't work??? -- 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: log out
You need to capitalize the 'L' in Location (HTTP headers are case-sensitive). Wrong... you can use header(location: index.php); just fine... Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send blank email to [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: log out
the header() function MUST be sent prior to any other output. Otherwise, it will fail. What else in the page precedes the header()? - On 9/12/01 5:54 AM, in article [EMAIL PROTECTED], Its Me [EMAIL PROTECTED] wrote: ?php session_start(); session_destroy(); header(location:http://$HTTP_HOST/mall/menu.php;); ? i wanna make this my log out page. it works without the: header(location:http://$HTTP_HOST/mall/menu.php;); i tried to put it befor session_destroy() but still didn't work??? -- 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-DB] php and WAP?
Hello, I have web site, based on PHP+MYSQL. What is the best (ofcouse and profesional) way to have the same site on WAP also? 1. Do I need to rewrite all PHP files in to wap language? 2. DO I have to do this manualy, or there is some utility, which converts automatically (profesionally)? (give a link plz) 3. Does WAP understand connecting to database, and then listing entries, like PHP? (do you know good tutorial?) Thanks. Andrius -- 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-DB] Sorting LDAP?
Is it possible to sort LDAP entries retrieved by an attribute (for example, on sn )? I don't see anything like this in the PHP docs. Hugh -- 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] php + MYSQL based banner exchange system
There's also PhpAdsNew, which picks up where PhpAds left off at its last release in May of 2000: http://sourceforge.net/projects/phpadsnew/ -Andy -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 1:42 PM To: Andrius Jakutis; [EMAIL PROTECTED] Subject: RE: [PHP-DB] php + MYSQL based banner exchange system http://www.phpwizard.net/projects/phpAds/ Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Andrius Jakutis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 6:24 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] php + MYSQL based banner exchange system Hello all, I need your recomendations, where to download from a good (profesional - many options) banner exchange system (subj.). I need it for free (I understand that not everything what is free is also good :) ). Any ideas? Sorry, if my message is offtopic. Sincerely, Andrius -- 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-DB] Re: php and WAP?
Maybe I need on-line gateway service that converts WML written pages for delivery to wireless devices??? Where could I get it for free? Thanks -- 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] php and WAP?
http://www.phpbuilder.com/columns/mike20010118.php3 Check this out! -Original Message- From: Andrius Jakutis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 7:31 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] php and WAP? Hello, I have web site, based on PHP+MYSQL. What is the best (ofcouse and profesional) way to have the same site on WAP also? 1. Do I need to rewrite all PHP files in to wap language? 2. DO I have to do this manualy, or there is some utility, which converts automatically (profesionally)? (give a link plz) 3. Does WAP understand connecting to database, and then listing entries, like PHP? (do you know good tutorial?) Thanks. Andrius -- 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-DB] Output buffering
Where in the manual can I read about output buffering? I need to email the phpinfo stuff to myself Thanks Randy --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001 -- 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: php and WAP?
You need to setup the MIME type, look below: Configuring MIME types Table 1. MIME Types for WAP Extension MIME Type Description .wml text/vnd.wap.wml WML source .wmls text/vnd.wap.wmlscript WMLScript source .wbmp image/vnd.wap.wbmp Wireless Bitmap In table 1, the mime types for serving WML content to your wireless device: WML (wireless markup language) .WMLS (WML SCRIPT), and WBMP to display Wireless Bitmap images. Table 2. MIME Types for Pre-Compiled WAP (optional) .wmlc application/vnd.wap.wmlc Compiled WML binary .wmlsc application/vnd.wap.wmlscriptc Compiled WMLScript binary In table 2, the WMLC gives your web server the ability to display WML in compiled binary format. This reduces the overhead and latency to the device. And you will be able to take advantage of content compression from the NES with this option in your web server. Apache: · First locate where the apache software is installed on your computer. Should this be a UNIX platform, then check /etc/httpd/conf/mime.typs or /usr/local/httpd/conf/mime.types . If not any of these locations, contact system administrator for further assistances. Configuring MIME types · Edit mime.types file using VI or any of your favorite editors. This will open up the mime type configuration file. In the configuration file you will need to input the mime types information as followed: · The most simplest way to configure apache with the appropriate mime types, just copy and paste the content o Compiled WML § application/vnd.wap.wmlc wmlc o WML Scripting § application/vnd.wap.wmlscriptc wmlsc o WML Content § text/vnd.wap.wml wml o Text Interpretation of WML Script § text/vnd.wap.wmlscript wmls o Wireless Bitmap Image § image/vnd.wap.wbmp wbmp IIS: · Right-click the desired directory (for instance Default Web Site) and select Properties. You'll see a tabbed Default Web Site Properties dialog box. · Select the HTTP Headers tab, and click File Types. · In the File Types dialog, click New Type. · Input the Extension and MIME type from Table 1, first line. · You don't need to worry about the period in front of the extension-whether you type it or not, IIS will set it correctly. However, be very careful in your spelling of the MIME type. A small typo here will give you strange errors on your WAP phone that can be very difficult to debug. · Repeat for each MIME type. · When you've finished, click OK and OK again to save your changes and close the Internet Service Manager. If prompted to Save console settings to iis.msc? click Yes. Configuring MIME types IPlanet: To access the MIME Types page, perform the following steps: 1. Access the Server Manager and click the Preferences tab. 2. Click the MIME Types link. 3. Make the desired changes and click OK. For more information, see The Create Mime Type Page in the online help and Chapter 13, Using Virtual Servers. From : http://docs.iplanet.com/docs/manuals/enterprise/50/ag/es60.pdf Netscape Fasttrack Web Server: To specify a default MIME type, use the Document Preferences page of the Server Manager. For more information, see the online help. http://docs.iplanet.com/docs/manuals/fasttrak/41/ag/ag.pdf -- 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-DB] php and mssql 8
is it possible to establish a connaction with php 4.0.4 to mssql server vers 8 ??? i've tried it serveral times but php alway crashes with the php_mssql70.dll extension - and the modul php_mssql from the 4.0.6 release doesn't work with php 4.04 is it there an other extension out there thanx cu -- 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] php and mssql 8
Sure, just use ODBC - it'll insulate you from issues like changing database versions and platforms. You can use native drivers or download ones from our site. Let me know if I can help. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: hausii [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 3:52 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] php and mssql 8 is it possible to establish a connaction with php 4.0.4 to mssql server vers 8 ??? i've tried it serveral times but php alway crashes with the php_mssql70.dll extension - and the modul php_mssql from the 4.0.6 release doesn't work with php 4.04 is it there an other extension out there thanx cu -- 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-DB] Storing code in a mysql database
I'm trying to store SQL code in a blob field in a mysql database, but i'm having a problem. The code looks like this $sql='select * from vehicle where company=$company_code';; After I retrieve it from the db i eval() it to get the result. I can make this work if i store the code in a variable, but not if i store it in a database table and retrieve it. I am sure i am missing the right combination of addslashes/striplashes etc. can anyone help on this problem? -- 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] Storing code in a mysql database
I've now progressed to the point where I'm not getting eval errors. The next problem is that is doesn't substitute the variable names: so the code $company_code=1; eval($sql='select * from vehicle where company=$company_code';); ends up $sql equal to 'select * from vehicle where company=$company_code' and not 'select * from vehicle where company=1' Any clues? TIA Mark -Original Message- From: Mark Newnham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 2:54 PM To: '[EMAIL PROTECTED]' Subject: [PHP-DB] Storing code in a mysql database I'm trying to store SQL code in a blob field in a mysql database, but i'm having a problem. The code looks like this $sql='select * from vehicle where company=$company_code';; After I retrieve it from the db i eval() it to get the result. I can make this work if i store the code in a variable, but not if i store it in a database table and retrieve it. I am sure i am missing the right combination of addslashes/striplashes etc. can anyone help on this problem? -- 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] Storing code in a mysql database
Try this eval(\$sql=\select * from vehicle where company=$company_code\;); Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: Mark Newnham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 4:34 PM Subject: RE: [PHP-DB] Storing code in a mysql database I've now progressed to the point where I'm not getting eval errors. The next problem is that is doesn't substitute the variable names: so the code $company_code=1; eval($sql='select * from vehicle where company=$company_code';); ends up $sql equal to 'select * from vehicle where company=$company_code' and not 'select * from vehicle where company=1' Any clues? TIA Mark -Original Message- From: Mark Newnham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 2:54 PM To: '[EMAIL PROTECTED]' Subject: [PHP-DB] Storing code in a mysql database I'm trying to store SQL code in a blob field in a mysql database, but i'm having a problem. The code looks like this $sql='select * from vehicle where company=$company_code';; After I retrieve it from the db i eval() it to get the result. I can make this work if i store the code in a variable, but not if i store it in a database table and retrieve it. I am sure i am missing the right combination of addslashes/striplashes etc. can anyone help on this problem? -- 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]
[PHP-DB] PHP 4.05 Oracle 8
I need to set up PHP to work on a Windows 2000 machine with IIS 5, PHP 4.05 and Oracle 8.0.5 installed. I was having problems with the connection and kept getting all kinds of errors about the TNSNAMES file, but now I'm getting this error. Warning: _oci_open_server: ORA-12699: Native service internal error in c:\inetpub\wwwroot\radar\index.php on line 6 Here's the code I'm using: ? $db = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 206.195.70.231)(PORT = 1522)) (CONNECT_DATA = (SID = radw)) ); $dbh = ocilogon(system,manager,$db); ? Can anyone help with this problem?? Thanks
RE: [PHP-DB] Re: php and WAP?
Yeah I also fail to see the php-db on-topic-ness of the original post, but nevertheless, it's early in the morning, here's my tuppence worth... All you need to do is configure Apache to make PHP process all .wml files, and then change the header at the top of all your WML files to header(Content-type: text/vnd.wap.wml); Looky here http://www.phpbuilder.com/columns/mike20010118.php3 Cheers Dave -Original Message- From: Nael Mohammad [mailto:[EMAIL PROTECTED]] Sent: 20 September 2001 00:32 To: 'Andreas D. Landmark'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Re: php and WAP? And you can also use http://xml.apache.org/cocoon2/index.html which you can program to transcode anything to anything you want or you can just get yourself a transcoder from www.aethersystems.com which uses Scout Web or Clearigo www.clearigo.com and then you have www.wap-shareware.com and use this with your web server http://www.wap-shareware.com/directory/miscellaneous/waptool.shtml -Original Message- From: Andreas D. Landmark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 4:22 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: php and WAP? At 20.09.2001 04:26, Andrius Jakutis wrote: Hello again, the problem Is that I found out, that my company doesn't support wml files at all. What Do I have solution? USe some gateway, translator what ever else? What I need is : person takes mobile, enter's some URL, and my web site is converted to wap language, so he can see everything, what is written with PHP Thanks php-db ?! I can't even figure out what the link is... but to answer your question, as long as your page is mostly text (images and wap doesn't really click) it's the end-user and not the developer who has to bother with it. Most WAP-serviceproviders provide their clients with http-gateways, and if not there are some free ones aswell that proxy user-requests and translate the http content to wml on the fly. -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- 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]
[PHP-DB] join 2 db
Hello, I have been use PHP connect to mssql 6.5 with FreeTDS. I'd like to select data from 2 table with separate in 2 database name. How could I do this? here is some example. DB#1 DB#2 |-- Table#1-in-DB#1 |-- Table#1-in-DB#2 |--field#1-in-Table#1-in-DB#1 |--field#1-in-Table#1-in-DB#2 |--field#2-in-Table#1-in-DB#1 |--field#2-in-Table#1-in-DB#2 The result may contain data which the key of any field in Table of each DB. Thanks SF -- 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]