RE: [PHP-DB] MySql Help needed

2003-03-30 Thread Peter Lovatt
Hi Try running a grant query GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON database_name.* TO [EMAIL PROTECTED] IDENTIFIED BY 'mypassword'; which will probably fix it Peter -Original Message- From: Sparky Kopetzky [mailto:[EMAIL PROTECTED] Se

Re: [PHP-DB] multiple connections to MySQL in a single script example

2003-03-30 Thread Doug Thompson
You will use the mysql_select_db() function. It sets the currently active database. You will call this function each time you wish to change which database is being used prior to issuing a query. You need to open only one connection as long as the databases are on the same server. If you are

[PHP-DB] Changing crypted LDAP passwd

2003-03-30 Thread Jan Roehrich
I'm currently trying to change a crypted passwd within an openldap server. Therefor I'm using ldap_modify(). But the problem is that ldap doesn't crypt the password itself, even if I write {crypt} in front of it. And crypting the password with crypt() doesn't work because I don't know the second p

[PHP-DB] naming conventions

2003-03-30 Thread Charles Kline
hi all, i was just wondering if there are any naming conventions when creating database connections. most of my books use $sql = "SQL STRING"; and $sth = $db->query() or $result = $db->query() I have no idea what sth stands for in this case, but was curious how others name stuff. thanks Cha

Re: [PHP-DB] naming conventions

2003-03-30 Thread Paul Burney
on 3/30/03 9:52 AM, Charles Kline at [EMAIL PROTECTED] appended the following bits to my mbox: > i was just wondering if there are any naming conventions when creating > database connections. most of my books use > > $sql = "SQL STRING"; > > and > > $sth = $db->query() or $result = $db->query()

Re: [PHP-DB] naming conventions

2003-03-30 Thread Roberto Plomp
In essence it doesn't matter so much which convention you use as long you use a convention, use it consistently and the convention itself doesn't come with too much complexity of it's own and is based on a clear philosophy. The naming convention I use in any environment or language uses simple pre

Re: [PHP-DB] MySql, PHP, and Dates

2003-03-30 Thread Jason Wong
On Sunday 30 March 2003 11:11, Bruce Feist wrote: > I wonder why the PHP/MySql interface doesn't simply return dates as > dates instead of strings. *frowns* How do you mean? PHP doesn't have a date type. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Inte

[PHP-DB] Resize pictures and store with MySQL

2003-03-30 Thread Frank McIsaac
Hi. I want to use PHP and MySQL to help make it easier to put pictures on a website. What I want to do is make a page that allows the client to submit a picture (or a bunch of pictures) and a caption for each picture to me via a form of some sort. Then, once the file gets here, I would l

[PHP-DB] Catch Errors

2003-03-30 Thread shaun
Hi, Is it possible to catch the type of error message returned form a mysql_query(); funtion for example if ($error == //duplicate row for table) { echo "This row already exists in the table"; } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

RE: [PHP-DB] Catch Errors

2003-03-30 Thread John W. Holmes
> Is it possible to catch the type of error message returned form a > mysql_query(); funtion > > for example > > if ($error == //duplicate row for table) > { > echo "This row already exists in the table"; > } Use mysql_error() and mysql_errno(). ---John W. Holmes... PHP Architect - A month

Re: [PHP-DB] Catch Errors

2003-03-30 Thread Leif K-Brooks
www.php.net/mysql-error shaun wrote: Hi, Is it possible to catch the type of error message returned form a mysql_query(); funtion for example if ($error == //duplicate row for table) { echo "This row already exists in the table"; } -- The above message is encrypted with double rot13 enc

Re: [PHP-DB] Resize pictures and store with MySQL

2003-03-30 Thread Mike Brum
Just to illustrate how you'd go about doing this: - User uploads image & description - You resize image with GD functions (look at imagecopyresized()) - Store URL and description to the mySQL table you made It's a very simple thing to do once you organize your file structure where you're going to

[PHP-DB] Create table example

2003-03-30 Thread Sparky Kopetzky
Good afternoon!! I have several (50+) tables I have to create in MySql. Is there a good PHP example on creating a table via PHP?? I will probably do all of the initial INSERTS that way, too. Thanks!! Robin Kopetzky Black Mesa Computer/Internet Services www.blackmesa-isp.net

RE: [PHP-DB] Create table example

2003-03-30 Thread John W. Holmes
> I have several (50+) tables I have to create in MySql. Is there a good PHP > example on creating a table via PHP?? I will probably do all of the > initial INSERTS that way, too. You don't create a table "via PHP", you simply pass a query through the mysql_query() function. If that query is a CRE

[PHP-DB] Starting to hate MySql... thinking about using MS Sql Server instead...... :-(((((((((

2003-03-30 Thread Sparky Kopetzky
ARGGHHH!!! Trying to use INFILE to load a small (125) entry block of data and all MqSql does is puke: ERROR 1148: The used command is not allowed with this MySql version. (3.23.55) If this command is no good, then what the hell am I supposed to use At least with MS, you have a nice, GUI to

RE: [PHP-DB] Starting to hate MySql... thinking about using MS Sql Server instead...... :-(((((((((

2003-03-30 Thread Neil Lathwood
> At least with MS, you have a nice, GUI to use... http://www.phpmyadmin.net/ Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Starting to hate MySql... thinking about using MS Sql Server instead...... :-(((((((((

2003-03-30 Thread Joe Keenan
Hi; You could try mysqlimport with the following syntax: mysqlimport -h localhost -u username -p -L dbname pathtofile where' file' is tab delimited text held on local machine. All the best, Joe -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] MySql, PHP, and Dates

2003-03-30 Thread Bruce Feist
Jason Wong wrote: On Sunday 30 March 2003 11:11, Bruce Feist wrote: I wonder why the PHP/MySql interface doesn't simply return dates as dates instead of strings. *frowns* How do you mean? PHP doesn't have a date type. Ummm That's a good reason! As I said, I'm a newbie to PHP, and somewhere

Re: [PHP-DB] INSERT Question

2003-03-30 Thread Charles Kline
Got it working - well actually not this exact form (I am will get to that) but another which uses checkboxes (which is basically the same idea). Here is what I did and this is a bit different because I am using HTML_QuickForm which does not allow me to use a name like name="fieldname[]" so my

Re: [PHP-DB] Starting to hate MySql... thinking about using MS Sql Server instead...... :-(((((((((

2003-03-30 Thread Doug Thompson
There's nothing like RTFM to douse the fire in a rant. 4.2.3 Startup Options for mysqld Concerning Security The following mysqld options affect security: --local-infile[=(0|1)] If one uses --local-infile=0 then one can't use LOAD DATA LOCAL INFILE. This setting has been defaulted to 0 in re

[PHP-DB] How to restrict maximum persistent connections for Oracle?

2003-03-30 Thread Jerry Tseng
Hi everybody, In php.ini, I can set the maximum persistent connections for MySql or ODBC. But I use Oracle 9i in my project. Who can tell me how to restrict maximum persistent connection for Oracle? Thanks. --Jerry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: htt

[PHP-DB] PHP and MySQL 4

2003-03-30 Thread Benjamin Higgins
Does PHP have support for MySQL 4? If I install MySQL 4, and rebuild PHP with --with-mysql, is that sufficient to get MySQL 4 support? Ben -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] PHP and MySQL 4

2003-03-30 Thread Jason Wong
On Monday 31 March 2003 04:46, Benjamin Higgins wrote: > Does PHP have support for MySQL 4? If I install MySQL 4, and rebuild PHP > with --with-mysql, is that sufficient to get MySQL 4 support? Yes. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrator

RE: [PHP-DB] PHP and MySQL 4

2003-03-30 Thread Luke Woollard
Sure does - sure is. -Original Message- From: Benjamin Higgins [mailto:[EMAIL PROTECTED] Sent: Monday, 31 March 2003 6:47 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP and MySQL 4 Does PHP have support for MySQL 4? If I install MySQL 4, and rebuild PHP with --with-mysql, is that suffi