[PHP-DB] MySQL denying access to...everything

2004-08-18 Thread AceZero2790
I finally got my PHP5 installation to support MySQL and now this. When I try 
to edit anything on mysqlgui.exe, it just gives me this error: error in 
database function: access denied for user @localhost...

I don't know if this has to do with my php installation or what. If not, 
flame me for all I care. I'm too sick of all this mess to care.

...somebody help...


RE: [PHP-DB] MySQL to EXCEL?

2004-08-18 Thread Ed Lazor
 -Original Message-
 
 You can use
 table
   tr
 td
 
 and each tr becomes an excel row and each td becomes a cell.  This may or
 may not work in/before excel97??
 
 If you're looking to create true excel files, then i highly suggest
 spreadsheetwrite_excel,
 It is an excellent codeset, enabling you to use many features of excel
 such
 as colors, math, formats, etc.
 
 doing it this way, is little to no different from exporting in csv format,
 but it does work
 as described.
 
 HTH
 Jeff

Wow, that's pretty interesting.  I'll play around with it =)

-Ed

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



RE: [PHP-DB] PHP5 not loading mysql.dll and mysqli.dll

2004-08-18 Thread balwantsingh
may be you have not uncommented
extension_dir=c:/php/ext/
(Directory in which the loadable extensions (modules) reside)

please check.

balwant

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 18, 2004 3:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] PHP5 not loading mysql.dll and mysqli.dll


I've been trying to install mysql. I installed that new PHP5 that just came
out with the zip file. I configured in php.ini where the .dll files are:
c:/php/ext/. Then I uncommented php_mysql.dll and php_mysqli.dll.

When I restarted apache 1.3.31, my server, it said that it could not find
those files in c:/php/ext/.

EX) PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll' -
the specified module could not be found.

Though the file is right there. So then I did research and found that those
files needed libmysql.dll and libmysqli.dll to load. However, those files
are already sitting nice and cozy in c:/php, and I copied them to c:/php/ext
just in case.

What's the problem?

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

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



[PHP-DB] Date Conversion

2004-08-18 Thread Ng Hwee Hwee
Hi all,

can someone kindly point me to a resource that converts all kinds of possible date 
inputs into MySQL format of -MM-DD?

example of formats to be converted includes:

d/m/yy
d/m/
d/mm/yy
d/mm/yyy
dd/mm/yy
dd/mm/yyy
d/mmm/yy
d/mmm/
dd/mmm/yy
dd/mmm/

yy   - 2 digit representation of year
   - ful numeric representation of year
m   - numeric representation of month, without leading zero
mm- numeric representation of month, with leading zero
mmm - short textual representation of month   
d   - day of month without leading zero
dd - day of month with leadin zero

thanx!

hwee

Re: [PHP-DB] MySQL denying access to...everything

2004-08-18 Thread Peter Ellis
This is a MySQL error on the server side - you need to make sure that
whatever user you're signing into MySQL with has access to modify the
database/table you're using.  I believe the GRANT keyword in MySQL is
what you need -- look at the MySQL reference manual:

http://dev.mysql.com/doc/

Good luck!
-- 
Peter Ellis - [EMAIL PROTECTED]
Web Design and Development Consultant
naturalaxis | http://www.naturalaxis.com/


On Tue, 2004-08-17 at 23:03 -0400, [EMAIL PROTECTED] wrote:
 I finally got my PHP5 installation to support MySQL and now this. When I try 
 to edit anything on mysqlgui.exe, it just gives me this error: error in 
 database function: access denied for user @localhost...
 
 I don't know if this has to do with my php installation or what. If not, 
 flame me for all I care. I'm too sick of all this mess to care.
 
 ...somebody help...

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



[PHP-DB] Re: Date Conversion

2004-08-18 Thread Torsten Roehr
Ng Hwee Hwee [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi all,

can someone kindly point me to a resource that converts all kinds of
possible date inputs into MySQL format of -MM-DD?

example of formats to be converted includes:

d/m/yy
d/m/
d/mm/yy
d/mm/yyy
dd/mm/yy
dd/mm/yyy
d/mmm/yy
d/mmm/
dd/mmm/yy
dd/mmm/

yy   - 2 digit representation of year
   - ful numeric representation of year
m   - numeric representation of month, without leading zero
mm- numeric representation of month, with leading zero
mmm - short textual representation of month
d   - day of month without leading zero
dd - day of month with leadin zero

thanx!

hwee

This question belongs more to the general list, but anyway:

You can use strtotime() to convert various formats to a timestamp. Then use
date() to convert it back to your preferred date format:

$timestamp = strtotime($inputDate);
$isoDate   = date('Y-m-d', $timestamp);

http://de2.php.net/strtotime
http://de2.php.net/manual/en/function.date.php

Regards, Torsten Roehr

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



Re: [PHP-DB] Re: Basic MySQL Query Question

2004-08-18 Thread Sun Liwen
thks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] MySQL denying access to...everything

2004-08-18 Thread Paul
Also, take care with the new password hashing:
http://dev.mysql.com/doc/mysql/en/Password_hashing.html

Paul


On Wed, 18 Aug 2004 00:56:08 -0700, Peter Ellis [EMAIL PROTECTED] wrote:
 This is a MySQL error on the server side - you need to make sure that
 whatever user you're signing into MySQL with has access to modify the
 database/table you're using.  I believe the GRANT keyword in MySQL is
 what you need -- look at the MySQL reference manual:
 
 http://dev.mysql.com/doc/
 
 Good luck!
 --
 Peter Ellis - [EMAIL PROTECTED]
 Web Design and Development Consultant
 naturalaxis | http://www.naturalaxis.com/
 
 
 
 
 On Tue, 2004-08-17 at 23:03 -0400, [EMAIL PROTECTED] wrote:
  I finally got my PHP5 installation to support MySQL and now this. When I try
  to edit anything on mysqlgui.exe, it just gives me this error: error in
  database function: access denied for user @localhost...
 
  I don't know if this has to do with my php installation or what. If not,
  flame me for all I care. I'm too sick of all this mess to care.
 
  ...somebody help...
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



[PHP-DB] Check Boxes

2004-08-18 Thread balwantsingh
can somebody advise me
i want to use checkboxes on my website, i want that if user selects some
checkboxes (there will be more than 20 checkboxes), checkbox's value will be
stored in variables and than SELECT query command will be run using these
variables through PHP.  but my problem is that in SELECT query command after
each column name comma (,) is required and if i use the same than it is
displaying  You have an error in your SQL syntax near 'FROM form' at line
1

pls. help.



balwant

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



Re: [PHP-DB] Check Boxes

2004-08-18 Thread John Holmes
balwantsingh wrote:
can somebody advise me
i want to use checkboxes on my website, i want that if user selects some
checkboxes (there will be more than 20 checkboxes), checkbox's value will be
stored in variables and than SELECT query command will be run using these
variables through PHP.  but my problem is that in SELECT query command after
each column name comma (,) is required and if i use the same than it is
displaying  You have an error in your SQL syntax near 'FROM form' at line
1
How about showing us some code kind of hard to help without that...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals  www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Check Boxes

2004-08-18 Thread balwantsingh
i am using following coding


$a1 = $_POST['ch1'];
$a2 = $_POST['ch2'];
$a3 = $_POST['ch3'];

if ($a1 or $a2 or $a3) {
$query = SELECT $a1, $a2, $a3 FROM form;
[EMAIL PROTECTED] ($query);
}
Enter_Dateinput type=checkbox name=ch1 value=Enter_Date
Opening_Unitsinput type=checkbox name=ch2 value=Opening_Units
Unit_Consumedinput type=checkbox name=ch3 value=Unit_Consumed


-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 18, 2004 5:43 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Check Boxes




balwantsingh wrote:
 can somebody advise me
 i want to use checkboxes on my website, i want that if user selects some
 checkboxes (there will be more than 20 checkboxes), checkbox's value will
be
 stored in variables and than SELECT query command will be run using these
 variables through PHP.  but my problem is that in SELECT query command
after
 each column name comma (,) is required and if i use the same than it is
 displaying  You have an error in your SQL syntax near 'FROM form' at line
 1

How about showing us some code kind of hard to help without that...


--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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



Re: [PHP-DB] Check Boxes

2004-08-18 Thread randy
If one of the checkboxes is NOT checked, then your query will break as
ift will look something like this:

SELECT xxx,,yyy FROM form;

Name your checkboxes like so: ch[]

input type=checkbox name=ch[] value=Enter_Date/

Then you can loop through the checkbox array and run your query that way

$chkboxes = $_POST['ch'];
$sql = 'SELECT ';
foreach($chkboxes as $k = $v)
{
$sql .= $v;
if($k  (sizeof($chkboxes) - 1))
{
$sql .= ', ';
}
}
$sql .= ' FROM form';


On Wed, 18 Aug 2004 15:01:01 +0530, balwantsingh
[EMAIL PROTECTED] wrote:
 i am using following coding
 
 $a1 = $_POST['ch1'];
 $a2 = $_POST['ch2'];
 $a3 = $_POST['ch3'];
 
 if ($a1 or $a2 or $a3) {
 $query = SELECT $a1, $a2, $a3 FROM form;
 [EMAIL PROTECTED] ($query);
 }
 Enter_Dateinput type=checkbox name=ch1 value=Enter_Date
 Opening_Unitsinput type=checkbox name=ch2 value=Opening_Units
 Unit_Consumedinput type=checkbox name=ch3 value=Unit_Consumed
 
 
 
 
 -Original Message-
 From: John Holmes [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 18, 2004 5:43 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Check Boxes
 
 balwantsingh wrote:
  can somebody advise me
  i want to use checkboxes on my website, i want that if user selects some
  checkboxes (there will be more than 20 checkboxes), checkbox's value will
 be
  stored in variables and than SELECT query command will be run using these
  variables through PHP.  but my problem is that in SELECT query command
 after
  each column name comma (,) is required and if i use the same than it is
  displaying  You have an error in your SQL syntax near 'FROM form' at line
  1
 
 How about showing us some code kind of hard to help without that...
 
 --
 
 ---John Holmes...
 
 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
 
 php|architect: The Magazine for PHP Professionals  www.phparch.com
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
randy [EMAIL PROTECTED]

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



RE: [PHP-DB] Check Boxes

2004-08-18 Thread Ford, Mike [LSS]
On 18 August 2004 11:24, randy wrote:

 $chkboxes = $_POST['ch'];
 $sql = 'SELECT ';
 foreach($chkboxes as $k = $v)
 {
   $sql .= $v;
   if($k  (sizeof($chkboxes) - 1))
   {
   $sql .= ', ';
   }
 }
 $sql .= ' FROM form';

  $sql = 'SELECT ' . implode(', ', $chkboxes) . 'FROM form';

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP-DB] Check Boxes

2004-08-18 Thread randy
yeah yeah...it's damn near 4 in the morning here...my brain isn't
exactly on at the moment.

:)

On Wed, 18 Aug 2004 11:35:59 +0100, Ford, Mike   [LSS]
[EMAIL PROTECTED] wrote:
 On 18 August 2004 11:24, randy wrote:
 
  $chkboxes = $_POST['ch'];
  $sql = 'SELECT ';
  foreach($chkboxes as $k = $v)
  {
$sql .= $v;
if($k  (sizeof($chkboxes) - 1))
{
$sql .= ', ';
}
  }
  $sql .= ' FROM form';
 
   $sql = 'SELECT ' . implode(', ', $chkboxes) . 'FROM form';
 
 Cheers!
 
 Mike
 
 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
randy [EMAIL PROTECTED]

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



Re: [PHP-DB] PHP5 not loading mysql.dll and mysqli.dll

2004-08-18 Thread Rory McKinley
John Holmes wrote:
[EMAIL PROTECTED] wrote:
I've been trying to install mysql. I installed that new PHP5 that just 
came out with the zip file. I configured in php.ini where the .dll 
files are: c:/php/ext/. Then I uncommented php_mysql.dll and 
php_mysqli.dll.

When I restarted apache 1.3.31, my server, it said that it could not 
find those files in c:/php/ext/.
Though the file is right there. So then I did research and found that 
those files needed libmysql.dll and libmysqli.dll to load. However, 
those files are already sitting nice and cozy in c:/php, and I copied 
them to c:/php/ext just in case.

Just ran through this _exact_ issue myself. Put the libmysql.dll files 
in the windows/system32/ directory. That fixed everything for me.

If you have had a previous version of PHP, make sure that you copy the 
libmysql.dll that came with the PHP5 zip and overwrite the existing file 
. I am too embarassed to admit how long it took me to figure this out :)

--
Rory McKinley
Nebula Solutions
+27 21 555 3227 - office
+27 21 551 0676 - fax
+27 82 857 2391 - mobile
www.nebula.co.za

This e-mail is intended only for the person to whom it is addressed and
may contain confidential information which may be legally privileged.
Nebula Solutions accepts no liability for any loss, expense or damage
arising from this e-mail and/or any attachments.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Check Boxes

2004-08-18 Thread John Holmes
Ford, Mike [LSS] wrote:
$chkboxes = $_POST['ch'];
$sql = 'SELECT ';
foreach($chkboxes as $k = $v)
{
$sql .= $v;
if($k  (sizeof($chkboxes) - 1))
{
$sql .= ', ';
}
}
$sql .= ' FROM form';

  $sql = 'SELECT ' . implode(', ', $chkboxes) . 'FROM form';
Just note that with either solution, someone can post a value of * 
FROM table WHERE 1# and see everything in any table in your database.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals  www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Check Boxes

2004-08-18 Thread Ford, Mike [LSS]
On 18 August 2004 15:53, John Holmes wrote:

 Ford, Mike [LSS] wrote:
 
   $chkboxes = $_POST['ch'];
   $sql = 'SELECT ';
   foreach($chkboxes as $k = $v)
   {
 $sql .= $v;
 if($k  (sizeof($chkboxes) - 1))
 {
 $sql .= ', ';
 }
   }
   $sql .= ' FROM form';
  
  
$sql = 'SELECT ' . implode(', ', $chkboxes) . 'FROM form';
 
 Just note that with either solution, someone can post a value of *
 FROM table WHERE 1# and see everything in any table in your database.

I was waiting for someone to come in with a security warning, but knew that whoever it 
was would express it much better than I could ;) -- so, a gold medal to John!!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP-DB] MySQL denying access to...everything

2004-08-18 Thread Doug Thompson
[EMAIL PROTECTED] wrote:
I finally got my PHP5 installation to support MySQL and now this. When I try 
to edit anything on mysqlgui.exe, it just gives me this error: error in 
database function: access denied for user @localhost...

I don't know if this has to do with my php installation or what. If not, 
flame me for all I care. I'm too sick of all this mess to care.

...somebody help...
http://dev.mysql.com/doc/mysql/en/User_Account_Management.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Check Boxes

2004-08-18 Thread Jason Wong
On Wednesday 18 August 2004 20:07, Ford, Mike [LSS] wrote:

 $sql = 'SELECT ' . implode(', ', $chkboxes) . 'FROM form';
 
  Just note that with either solution, someone can post a value of *
  FROM table WHERE 1# and see everything in any table in your database.

 I was waiting for someone to come in with a security warning, but knew that
 whoever it was would express it much better than I could ;) -- so, a gold
 medal to John!!

The trouble is that it's a never ending task. Almost every question concerning 
sql queries and accepting info from POST, GET etc have security implications 
if data is not sanitised. Where do you begin? Where do you end?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
Everything is worth precisely as much as a belch, the difference being
that a belch is more satisfying.
-- Ingmar Bergman
*/

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



[PHP-DB] ODBC_Connect error message

2004-08-18 Thread Seader, Cameron
Greetings,
I am having some trouble with this error message and finding out what it really means. 
I receive this in my HTTP error log from apache 1.3.

[Tue Aug 17 23:36:04 2004] [error] PHP Warning:  odbc_connect(): SQL error: , SQL 
state ÿÿÿþ in SQLConnect in /srv/www/htdocs/acquisuite/idxdb2.php on line 572

I have no idea why this is doing this. It worked on another machine, but eversince in 
I put it on a new machine i get this message. I am running SLES 8 for s390x on 
Mainframe. It is 64 bit. my configure options for PHP are: ./configure --with-apxs 
--enable-track-vars --with-ibm-db2=/home/db2admin/sqllib --enable-bcmath 
--with-zlib=yes 
So i have DB2 support with DB2 Connect installed on SUSE. It has worked before on a 
RedHat 7.2 OS on s390x platform. Does anyone have any idea what the SQL state ÿÿÿþ 
means?

TIA,
Cameron Seader



[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential and/or 
exempt from disclosure under applicable law.  If you are not the intended recipient, 
you are hereby notified that any disclosure, copying, distribution, or use of the 
information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. 
If you received this transmission in error, please immediately contact the sender and 
destroy the material in its entirety, whether in electronic or hard copy format.  
Thank you.   A2

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



Re: [PHP-DB] Re: Date Conversion

2004-08-18 Thread Paul
You might want to look into date conversion on the MySQL side:

http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html

Look for 

DATE_FORMAT(date,format)

Paul


On Wed, 18 Aug 2004 10:16:59 +0200, Torsten Roehr [EMAIL PROTECTED] wrote:
 Ng Hwee Hwee [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
 
 Hi all,
 
 can someone kindly point me to a resource that converts all kinds of
 possible date inputs into MySQL format of -MM-DD?
 
 example of formats to be converted includes:
 
 d/m/yy
 d/m/
 d/mm/yy
 d/mm/yyy
 dd/mm/yy
 dd/mm/yyy
 d/mmm/yy
 d/mmm/
 dd/mmm/yy
 dd/mmm/
 
 yy   - 2 digit representation of year
    - ful numeric representation of year
 m   - numeric representation of month, without leading zero
 mm- numeric representation of month, with leading zero
 mmm - short textual representation of month
 d   - day of month without leading zero
 dd - day of month with leadin zero
 
 thanx!
 
 hwee
 
 This question belongs more to the general list, but anyway:
 
 You can use strtotime() to convert various formats to a timestamp. Then use
 date() to convert it back to your preferred date format:
 
 $timestamp = strtotime($inputDate);
 $isoDate   = date('Y-m-d', $timestamp);
 
 http://de2.php.net/strtotime
 http://de2.php.net/manual/en/function.date.php
 
 Regards, Torsten Roehr
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



[PHP-DB] Re: MySQL denying access to everything

2004-08-18 Thread AceZero2790
Look I'm totally new to this, so all this MySQL stuff you are sending me too 
is like an alien language to me.

Can you just tell me how to delete all this MySQL stuff so I can start again 
or something? Because even when I reinstall MySQL and delete my old 
MySQLgui.exe, it still gives me the same problem...


Re: [PHP-DB] Re: MySQL denying access to everything

2004-08-18 Thread randy
you need to ditch the 'data' directory (in the MySQL installation
root) and start from scratch. If you just re-install the MySQL server,
I don't think it will overwrite your data directory.


On Wed, 18 Aug 2004 10:30:25 EDT, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Look I'm totally new to this, so all this MySQL stuff you are sending me too
 is like an alien language to me.
 
 Can you just tell me how to delete all this MySQL stuff so I can start again
 or something? Because even when I reinstall MySQL and delete my old
 MySQLgui.exe, it still gives me the same problem...
 


-- 
randy [EMAIL PROTECTED]

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



[PHP-DB] MySQL denying access to everything...Part 2

2004-08-18 Thread AceZero2790
Ok, thanks to many people's help, I have managed to install MySQL right and 
login as root with no password. However, MySQL will not allow to log in to my 
databases as root. Is this normal, because when I try it brings back the old 
access denies: [EMAIL PROTECTED] thing.

So I thought maybe I just have to figure out how to create accounts, and then 
configure them to be all access. I have read the manual on  creating 
accounts, but for some reason it doesn't work. Here is how it goes:

I access mysql.exe and put in this:

mysql GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'


Then I hit enter. It starts me off with an indented down arrow and I finish 
the GRANT command.
 
- IDENTIFIED BY 'password' WITH GRANT OPTION;

Then I hit enter. IT gives me another down arrow. I hit enter again and again 
and again and all it does is give me more indented down arrows...  What now?









[PHP-DB] No Cookies file created on Client

2004-08-18 Thread Larry Sandwick
After connecting to a database I execute the following code. I never get a
file created on the computer that is logging in. At the top of the code I do
have ob_start(); and ob_end_flush(); 

 

If I go to other web sites I get there cookies file.

 

code

 

setcookie(logged_in, 1, time()+300, /);

setcookie(username, $username, time()+300, /);

setcookie(password, $password, time()+300, /);

setcookie(line, $line, time()+300, /);

setcookie(type, $type, time()+300, /);

setcookie(account,  $account, time()+300, /);

setcookie(dealer,   $dealer, time()+300, /);

 

/code

 

Any comments or suggestions would be appreciated !

 

Larry Sandwick

Sarreid, Ltd.

Network/System Administrator

phone: (252) 291-1414 x223

fax  : (252) 237-1592

 


  _  

My Inbox is protected by SPAMfighter
4020 spam mails have been blocked so far.
Download free SPAMfighter http://www.spamfighter.com/  today! 


Re: [PHP-DB] MySQL denying access to everything...Part 2

2004-08-18 Thread Peter Ellis
This isn't the appropriate list to direct this question to.  I suggest
one of the MySQL help lists or a careful reading of the documentation,
which tells you exactly what you need to know.
-- 
Peter Ellis - [EMAIL PROTECTED]
Web Design and Development Consultant
naturalaxis | http://www.naturalaxis.com/

On Wed, 2004-08-18 at 14:43 -0400, [EMAIL PROTECTED] wrote:
 Ok, thanks to many people's help, I have managed to install MySQL right and 
 login as root with no password. However, MySQL will not allow to log in to my 
 databases as root. Is this normal, because when I try it brings back the old 
 access denies: [EMAIL PROTECTED] thing.
 
 So I thought maybe I just have to figure out how to create accounts, and then 
 configure them to be all access. I have read the manual on  creating 
 accounts, but for some reason it doesn't work. Here is how it goes:
 
 I access mysql.exe and put in this:
 
 mysql GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'
 
 
 Then I hit enter. It starts me off with an indented down arrow and I finish 
 the GRANT command.
  
 - IDENTIFIED BY 'password' WITH GRANT OPTION;
 
 Then I hit enter. IT gives me another down arrow. I hit enter again and again 
 and again and all it does is give me more indented down arrows...  What now?

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



Re: [PHP-DB] No Cookies file created on Client

2004-08-18 Thread Peter Ellis
Sounds like it could be permissions -- more code would help, but general
comments:

1) make sure you have access to the database
2) make sure the server you're using has write access to wherever that
file is being written
3) you might consider putting setcookies close to the top of the file,
as it needs to be sent with headers and putting it too far down (in my
experience) can cause problems with setting the cookies.
4) is the browser configured to accept cookies from that site?  You can
block some sites and not others.
5) this isn't really a database question :)
-- 
Peter Ellis - [EMAIL PROTECTED]
Web Design and Development Consultant
naturalaxis | http://www.naturalaxis.com/

On Wed, 2004-08-18 at 15:20 -0400, Larry Sandwick wrote:
 After connecting to a database I execute the following code. I never get a
 file created on the computer that is logging in. At the top of the code I do
 have ob_start(); and ob_end_flush(); 
 
  
 
 If I go to other web sites I get there cookies file.
 
  
 
 code
 
  
 
 setcookie(logged_in, 1, time()+300, /);
 
 setcookie(username, $username, time()+300, /);
 
 setcookie(password, $password, time()+300, /);
 
 setcookie(line, $line, time()+300, /);
 
 setcookie(type, $type, time()+300, /);
 
 setcookie(account,  $account, time()+300, /);
 
 setcookie(dealer,   $dealer, time()+300, /);
 
  
 
 /code
 
  
 
 Any comments or suggestions would be appreciated !
 
  
 
 Larry Sandwick
 
 Sarreid, Ltd.
 
 Network/System Administrator
 
 phone: (252) 291-1414 x223
 
 fax  : (252) 237-1592
 
  
 
 
   _  
 
 My Inbox is protected by SPAMfighter
 4020 spam mails have been blocked so far.
 Download free SPAMfighter http://www.spamfighter.com/  today! 

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



[PHP-DB] Re: MySQL denying access to everything part 2 [CANCELED]

2004-08-18 Thread AceZero2790
Sorry, then. Just that people were helping me earlier...but anyway never mind 
thanks for all your previous help.


[PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Vern
I have a bunch of thumbnails that are pulled from a recordset based on a
user profile.
Each thumbnail opens the picture into another page so that the picture is
larger and I want to now have that user's pictures accessible by clicking a
previous and/or next arrow.

The first recordset of thumbnails is retrieved by a URL link
($HTTP_GET_VARS['id']) which is the user's ID number.
Click on one of the thumbnails a new page is open that display the larger
photo, but only that photo. I can of course pass along the user's ID as well

mypage.php?photoID=uploads/1052367746.jpguserID=215

which of course will allow me to create a new recordset based on the user's
id

SELECT *
FROM penpals_photos
WHERE penpals_photos.filename = $photoID

but how do I point the database first record at the photoID so that I can
use the next and previous options to see the next/previous picture?

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



Re: [PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Peter Ellis
I assume you mean the 1052367746 portion of that URL?  Am I right?  If
so:

$id = basename($photoid, .jpg);

That would work, I think, if you just wanted the numeric portion of the
path.  Not sure if this is what you want.
-- 
Peter Ellis - [EMAIL PROTECTED]
Web Design and Development Consultant
naturalaxis | http://www.naturalaxis.com/

On Wed, 2004-08-18 at 19:55 -0400, Vern wrote:
 I have a bunch of thumbnails that are pulled from a recordset based on a
 user profile.
 Each thumbnail opens the picture into another page so that the picture is
 larger and I want to now have that user's pictures accessible by clicking a
 previous and/or next arrow.
 
 The first recordset of thumbnails is retrieved by a URL link
 ($HTTP_GET_VARS['id']) which is the user's ID number.
 Click on one of the thumbnails a new page is open that display the larger
 photo, but only that photo. I can of course pass along the user's ID as well
 
 mypage.php?photoID=uploads/1052367746.jpguserID=215
 
 which of course will allow me to create a new recordset based on the user's
 id
 
 SELECT *
 FROM penpals_photos
 WHERE penpals_photos.filename = $photoID
 
 but how do I point the database first record at the photoID so that I can
 use the next and previous options to see the next/previous picture?

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



Re: [PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Vern
That's not what I mean at all. I actually have no idea where you got that
from. :)

Basically what I'm trying to say is this. The following is my url:

mypage.php?photoID=uploads/1052367746.jpguserID=215

 photoID =  uploads/1052367746.jpg
 userID   =  215

I want to point to a record in a recordset.
That records id is  uploads/1052367746.jpg
However, I want to return all records for the userID 215.

How do I point my recordset at that file in the recordset so that the user
can go to the next and previous records in that recordset based on the
user's id?

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



Re: [PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Peter Ellis
Ach, and the light bulb goes on.  Sorry, wasn't really thinking about it
completely earlier.

Here's a less dimbrained suggestion: could you encode the user ID as
part of the filename itself?  Like, for instance, write the script so
that it would read something like:

blah.jpg.215

and strip off the .215, converting it into a user ID and stripping it
from the file name before displaying the file?

Hopefully, that's much closer to an actual coherent suggestion :)

- P

On Wed, 2004-08-18 at 21:23 -0400, Vern wrote:
 That's not what I mean at all. I actually have no idea where you got that
 from. :)
 
 Basically what I'm trying to say is this. The following is my url:
 
 mypage.php?photoID=uploads/1052367746.jpguserID=215
 
  photoID =  uploads/1052367746.jpg
  userID   =  215
 
 I want to point to a record in a recordset.
 That records id is  uploads/1052367746.jpg
 However, I want to return all records for the userID 215.
 
 How do I point my recordset at that file in the recordset so that the user
 can go to the next and previous records in that recordset based on the
 user's id?
 

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



Re: [PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Vern
Sorry but that doesn't make and sense either. I have no problems passing the
variables along. Why are you trying to tag that to the image?

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



[PHP-DB] Re: Tricky MySQL / php Script

2004-08-18 Thread Hans Lellelid
Hi Vern,
Vern wrote:
The first recordset of thumbnails is retrieved by a URL link
($HTTP_GET_VARS['id']) which is the user's ID number.
Click on one of the thumbnails a new page is open that display the larger
photo, but only that photo. I can of course pass along the user's ID as well
mypage.php?photoID=uploads/1052367746.jpguserID=215
which of course will allow me to create a new recordset based on the user's
id
SELECT *
FROM penpals_photos
WHERE penpals_photos.filename = $photoID
but how do I point the database first record at the photoID so that I can
use the next and previous options to see the next/previous picture?
What you are doing makes sense, but there are some other questions that 
must be answer.

1) How are photos and users related?  i.e. what type of relationship 
(1-n, n:m, etc.), what tables / columns ... ?

2) What makes a thumbnail previous or next?  i.e. are they sequenced 
by dates or some arbitrary sequence field, or ... ?

If the photos and users are related by some intermediary table, you 
could probably do a query like this to get all of the photos for a user:

SELECT photos.*
FROM penpals_photos photos,
 penpals_photos_x_users photos_users
WHERE photos.photoID = photos_users.photoID AND
  photos_users.userID = $userID
Just add the ORDER BY to order them correctly.
To get the actual prev or next given a particular photo id, you can 
just use  and  and the sequence column DESC/ASC order by and LIMIT 1 
 I'll leave that to you to figure out; it's not too tricky once 
you've got your queries to fetch all of the photos for a user in the 
correct order.

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


RE: [PHP-DB] MySQL denying access to everything...Part 2

2004-08-18 Thread balwantsingh
mysql grant all privileges on *.* to [EMAIL PROTECTED] identified by
'password' with grant option;

try this out

balwant


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 19, 2004 12:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL denying access to everything...Part 2


Ok, thanks to many people's help, I have managed to install MySQL right and
login as root with no password. However, MySQL will not allow to log in to
my
databases as root. Is this normal, because when I try it brings back the old
access denies: [EMAIL PROTECTED] thing.

So I thought maybe I just have to figure out how to create accounts, and
then
configure them to be all access. I have read the manual on  creating
accounts, but for some reason it doesn't work. Here is how it goes:

I access mysql.exe and put in this:

mysql GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'


Then I hit enter. It starts me off with an indented down arrow and I finish
the GRANT command.

- IDENTIFIED BY 'password' WITH GRANT OPTION;

Then I hit enter. IT gives me another down arrow. I hit enter again and
again
and again and all it does is give me more indented down arrows...  What now?

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



Re: [PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Jason Wong
On Thursday 19 August 2004 09:23, Vern wrote:

 Basically what I'm trying to say is this. The following is my url:

 mypage.php?photoID=uploads/1052367746.jpguserID=215

  photoID =  uploads/1052367746.jpg
  userID   =  215

 I want to point to a record in a recordset.
 That records id is  uploads/1052367746.jpg
 However, I want to return all records for the userID 215.

 How do I point my recordset at that file in the recordset so that the user
 can go to the next and previous records in that recordset based on the
 user's id?

Assuming you have already created your 'recordset':

  loop through recordset looking for 'photoID'
  when found, use mysql_data_seek() to grab the previous and next records

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
No problem is so formidable that you can't walk away from it.
 -- C. Schulz
*/

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