[PHP-DB] Access to MySQL denied
I cannot connect to MySQL database located at the webhost. The command: $link = mysql_connect('hostname:3306','username','password') or die (Could not connect); (with the proper hostname of course) returns this error message: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) Of course, it works perfectly fine on my home computer, so I guess it must have something to do with the configuration of PHP (or, possibly, MySQL?) Can anyone tell me what's going on? Thanks, Kirill :) -- 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] Access to MySQL denied
Of course, it works perfectly fine on my home computer, so I guess it musthave something to do with the configuration of PHP (or, possibly, MySQL?) How do you connect to MySQl from home? It sounds as if the user trying to connect to MySQL doesn't have the right privileges to connect top the server. Make sure the 'username' @lsh101.siteprotect.com has been granted all the right privileges on the desired database: GRANT SELECT,INSERT,UPDATE,DELETE ON mydb.* TO username@localhost (or [EMAIL PROTECTED]) IDENTIFIED BY 'your_password'; FLUSH PRIVILIGES; HTH. Russ On Fri, 26 Oct 2001 04:48:56 -0400 Kirill Safarov [EMAIL PROTECTED] wrote: I cannot connect to MySQL database located at the webhost. The command: $link = mysql_connect('hostname:3306','username','password') or die (Could not connect); (with the proper hostname of course) returns this error message: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) Of course, it works perfectly fine on my home computer, so I guess it must have something to do with the configuration of PHP (or, possibly, MySQL?) Can anyone tell me what's going on? Thanks, Kirill :) -- 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 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] Access to MySQL denied
I am new to MySQL (I am more used to Microsoft SQL), but it seems to me that if I provide username string as the username parameter, that's what MySQL should use to login into the database. Why is @lsh101.siteprotect.com being appended to it? The username was provided by the webhost, and according to them it has full priviledges. Kirill. -- 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] problems with php and oracle ....
For developement reasons (oracle realted) I hadto abandone mod_php.tgz (php 4.0.5) package delivered with slackware 8.0 and use php 4.0.6 so I.m currently working with: php 4.0.6 and apache 1.3.20 ona a slackware 8.0 (with kernel 2.2.19). At first I recompiled php 4.0.6 with exact same options of original package ( got oprions from phpinfo() ) and all went fine. I then decided to try adding oracle database support. I recompiled apache to be linked against libpthread (as told to do so from erlier bug report related to oracle sybase) with not little effort since apache's configure does not ponder such action!: root@extensa:~# ldd /usr/sbin/httpd libm.so.6 = /lib/libm.so.6 (0x4002) libcrypt.so.1 = /lib/libcrypt.so.1 (0x40042000) libdb.so.3 = /lib/libdb.so.3 (0x4007) libdl.so.2 = /lib/libdl.so.2 (0x400c3000) libpthread.so.0 = /lib/libpthread.so.0 (0x400c7000) libc.so.6 = /lib/libc.so.6 (0x400dd000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000) Had some trouble with --with-mm=/usr option which is enabled per default on mpd_php.tgz package for slackware while trying to start apache got this error: /usr/libexec/libphp4.so: undefined symbol: mm_create So I temporarely removed it to get oracle working. This ti what I did: export LD_LIBRARY_PATH=/ora/app/oracle/product/8.0.5/lib:/usr/lib:/lib export LD_RUN_LIBRARY_PATH=/ora/app/oracle/product/8.0.5/lib:/usr/lib:/lib make clean rm config.cache ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --with-mod_charset --enable-force-cgi-redirect --enable-discard-path --with-con fig-file-path=/etc/apache --enable-safe-mode --with-openssl --enable-bcmath --with-bz2 --enable-calendar --enable-ctype --with-gdbm --enable-ftp --enable-gd-imgstrttf --with-gd=/usr/src/gd-1.8.2 --with-jpeg-dir=/usr/src/gd-1.8.2 --with-png-dir --with-gmp --with-my sql=/usr --with-xml=shared --with-readline=/usr --enable-trans-sid --enable-shmop --enable-sockets --with-regex=php --enable-sysvsem --enable-sysvshm --enable-yp --enable-memory-limit --with-tsrm-pthreads --enable-shared --disable-debug --with-zlib=/usr --with-ora cle=/opt/ora_syb/ora/app/oracle/product/8.0.5 this stage went successfully with no ATTENTION message no errors produced in debug.log so I went ahead and compiled installed: make /usr/sbin/apachectl stop make install root@extensa:~# ldd /usr/libexec/libphp4.so libdl.so.2 = /lib/libdl.so.2 libreadline.so.4 = /usr/lib/libreadline.so.4 libhistory.so.4 = /usr/lib/libhistory.so.4 libncurses.so.5 = /lib/libncurses.so.5 libclntsh.so.1.0 = /opt/ora_syb/ora/app/oracle/product/8.0.5/lib/libclntsh.so.1.0 libm.so.6 = /lib/libm.so.6 libnsl.so.1 = /lib/libnsl.so.1 libmysqlclient.so.10 = /usr/lib/libmysqlclient.so.10 libz.so.1 = /usr/lib/libz.so.1 libgmp.so.3 = /usr/lib/libgmp.so.3 libpng.so.2 = /usr/lib/libpng.so.2 libjpeg.so.62 = /usr/lib/libjpeg.so.62 libgdbm.so.2 = /usr/lib/libgdbm.so.2 libbz2.so.1.0 = /lib/libbz2.so.1.0 libcrypt.so.1 = /lib/libcrypt.so.1 libssl.so.0 = /usr/lib/libssl.so.0 libcrypto.so.0 = /usr/lib/libcrypto.so.0 libresolv.so.2 = /lib/libresolv.so.2 libc.so.6 = /lib/libc.so.6 /lib/ld-linux.so.2 = /lib/ld-linux.so.2 Apache restarted ok and php seamed to work ok but as I made a very simple function to start testing if I could query an oracle instance I ran into trouble: function oraconnect_test($a,$b) { $conn = Ora_Logon(system@orcl,manager); $string = Ora_Error ($conn); print $string; ora_logoff ($conn); } Every time I run this function I get one more defunct httpd process a some warning messages from php: Warning: Oracle: Connection Failed: Error while trying to retrieve text for error ORA-12154 in /home/httpd/html/cpr/functions.php on line 223 Warning: Supplied argument is not a valid Oracle-Connection/Cursor resource in /home/httpd/html/cpr/functions.php on line 225 Warning: Supplied argument is not a valid Oracle-Connection resource in /home/httpd/html/cpr/functions.php on line 228 According to oracle ORA-12154 means: 12154, 0, TNS:could not resolve service name // *Cause: The service name specified is not defined correctly in the // TNSNAMES.ORA file. // *Action: Make the following checks and correct the error: // - Verify that a TNSNAMES.ORA file exists and is in the proper // place and accessible. See the operating system specific manual // for details on the required name and location. // - Check to see that the service name exists in one of the // TNSNAMES.ORA files and add it if necessary. // - Make sure there are no syntax errors anywhere in the file. // Particularly look for unmatched parentheses or stray characters. // Any error in a TNSNAMES.ORA file makes it unusable. See // Chapter
[PHP-DB] date
how would i enter european format date into mysql (dd/mm/) ... and how would i make the query sort by date if i am using this format ?? ax -- 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] Access to MySQL denied
If your php-script runs on the same server as mysql, you should try 'localhost' as the hostname. That worked for me in most cases. Russ Michell [EMAIL PROTECTED] schreef in bericht news:SIMEON.10110260917.B@k1c. anglia.ac.uk... Of course, it works perfectly fine on my home computer, so I guess it musthave something to do with the configuration of PHP (or, possibly, MySQL?) How do you connect to MySQl from home? It sounds as if the user trying to connect to MySQL doesn't have the right privileges to connect top the server. Make sure the 'username' @lsh101.siteprotect.com has been granted all the right privileges on the desired database: GRANT SELECT,INSERT,UPDATE,DELETE ON mydb.* TO username@localhost (or [EMAIL PROTECTED]) IDENTIFIED BY 'your_password'; FLUSH PRIVILIGES; HTH. Russ On Fri, 26 Oct 2001 04:48:56 -0400 Kirill Safarov [EMAIL PROTECTED] wrote: I cannot connect to MySQL database located at the webhost. The command: $link = mysql_connect('hostname:3306','username','password') or die (Could not connect); (with the proper hostname of course) returns this error message: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) Of course, it works perfectly fine on my home computer, so I guess it must have something to do with the configuration of PHP (or, possibly, MySQL?) Can anyone tell me what's going on? Thanks, Kirill :) -- 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 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] getting results from INSERT
I think you want this. $sql = INSERT INTO table (cod, nome, email) VALUES ('', '$nome', '$email'); $result = mysql_query($sql); $cod = mysql_insert_id(); The $cod is the primery key. Hope it helps. Bruno Gimenes Pereti. - Original Message - From: Matt Stewart [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 26, 2001 9:57 AM Subject: [PHP-DB] getting results from INSERT What i'm after is getting the primary key for a record that's just been added - I have an image file upload accompanying a database addition, and the image gets renamed $unique_ID.jpeg only problem is that the current method inserts the information, which auto produces the primary key, but the only way i know to extract that is by doing a SELECT, searching for all the matching values to the ones just entered, and if two entries are the same(except for the primary key - which is unknown), the image will replace the earlier entry, rather than the one i actually want it to be for. Is there a way of returning this primary key immediately after that record is created? -- 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] date
Assume the following table: create mytable ( mydate date ); Assume the following inserts: INSERT INTO mytable VALUES( 2003-02-20); INSERT INTO mytable VALUES( 2004-12-25); INSERT INTO mytable VALUES( 1999-01-01); The following will order this table, assuming precedence of year-month-day, and print in Euro format: SELECT DATE_FORMAT(mydate,%d/%m/%Y) FROM mytable ORDER BY mydate; The following will order this table, assuming precedence of day-month-year, and print in Euro format: SELECT DATE_FORMAT(mydate,%d/%m/%Y) AS edate FROM mytable ORDER BY edate; With basic PHP, you can format the Euro date input into the script into the -MM-DD requied for insertion into the database. -Original Message- From: ax [mailto:[EMAIL PROTECTED]] Sent: Friday, October 26, 2001 6:11 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] date how would i enter european format date into mysql (dd/mm/) ... and how would i make the query sort by date if i am using this format ?? ax -- 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] date
User inserts date as a select menu for day, month and year: $day, $month, $year You swap it around for an insert: $dateinsert = $year . $month . $day Then query the DB: Select blah from blah where blah=blah order by datefield (Let MySQL do the rest) Good luck! Russ On Fri, 26 Oct 2001 12:10:51 +0100 ax [EMAIL PROTECTED] wrote: how would i enter european format date into mysql (dd/mm/) ... and how would i make the query sort by date if i am using this format ?? ax -- 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 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-DB] SSL and IE
I'm programming a credit card payment form using PHP and I have been getting some strange feedback from test groups. The groups are varied as much as possible, and it seems as though some of the ones using MSIE 5.x are having trouble connecting to the secure page while others using MSIE 5.x CAN connect. I'm not what the difference is in the versions - any thoughts or known issues on this? - Jonathan ___ Mensa Torture: Drinking a 64 oz. Icee in 8 seconds. -- 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] SSL and IE
I had the same problem, and it seems to be tied to very specific releases of IE. Unfortunately one of them is released with Win98 SE, so it could be widespread. My version is 5.00.2614.3500 It also affects some static pages, so it may be an IE/Apache issue. Disabling SSL3 support in IE fixed it, but this is less than ideal. The only other answer I had was a 'Telephone us with your card details if you can't connect to the secure server' message. This is still relevant to me too, so if anybody else has any answers . Peter Lovatt -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: 26 October 2001 18:10 To: [EMAIL PROTECTED] Subject: [PHP-DB] SSL and IE I'm programming a credit card payment form using PHP and I have been getting some strange feedback from test groups. The groups are varied as much as possible, and it seems as though some of the ones using MSIE 5.x are having trouble connecting to the secure page while others using MSIE 5.x CAN connect. I'm not what the difference is in the versions - any thoughts or known issues on this? - Jonathan ___ Mensa Torture: Drinking a 64 oz. Icee in 8 seconds. -- 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 Stored Procedures
Hi, I'm new to this newsgroup, and I can't seem to find this anywhere else, so I thought I would ask. I have a problem getting output from stored procedures through PHP. I am connecting to an MS-SQL server through odbc (easysoft OOB), however this is a flexible environment. What I really need to know is. Is it possible to recieve output from a stored procedure in PHP v 4.0.6 in any environment, and if so, what kind of configuration is required. A big question I know.. but any help what-so-ever is appreciated. Shawn. -- 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 MySQL Queries...
Well I would like to thank everyone that helped me create php script to search a MySQL database using a form to pass the contents of the textbox to the php script as a variable in the search string. Here is the final script if anyone wants to use it, update, enhance feel free just send me a copy so I can update my own. Thanks again eveyone!! jason enj0i.com ?php # # phpMySearch v. 0.1.3 - MySQL DB Search Form # # Author: Jason Gerfen # Email: [EMAIL PROTECTED] # Site: http://enj0i.com # Date: 10.26.2001 # # Script functions: # * Connect to MySQL DB using PHP # * Uses form to pass variable as a search sting. # * Displays results of search. # # Requirments: # * PHP MySQL # # Copyright: # This script can be redistributed as long as the header # remains intact. If you make changes to this script, or # enhancements please send me a copy so I may update # my own script. Thanks, Jason # # Instructions: # * Create form with form names corresponding # to the table names in your database. # * Change connection parameters for your # database host, username, password # database name. (see comments in script) # * Change table names to match tables in your # databse. # /* Change db_hostname, db_username db_password for your database connection and login */ mysql_connect (db_hostname, db_username, db_password) or die(Couldn't connect!); /* Change db_name to match your database name */ mysql_select_db (db_name) or die(Couldn't select database); /* Change db_tablename to match tables you want to search */ if ($db_tablename == ) {$db_tablename = '%';} /* Change db_tablename to match tables in database */ $result = mysql_query (SELECT * FROM db_tablename WHERE fname LIKE '%$db_table%'); if ($row = mysql_fetch_array($result)) { /* Change all instances of db_table to match your db table structure */ do { PRINT Your search results: brbr; PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); PRINT bdb_table: /b ; print $row[db_table]; print (br); print (hr); } while($row = mysql_fetch_array($result)); } else {print Sorry, no records were found!;} ? -- 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] Help! ¡Ayuda!
I'm trying to read a record from a dbase data base so I've previously opened it successfully. The problem is that I call the function dbase_get_record, but it returns no records. The database is ok because I call the funcion dbase_numfields and dbase_numrecords and they give me correct information. Would you help me, please?. Here is the source code that fails. [EMAIL PROTECTED] Estoy intentando leer un registro de una base de datos dbase, por lo que antes la he abierto con éxito. el problema residen en que llamo a la función dbase_get_record, pero no me devuelve ningún registro. La base de datos está bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código fuente: [EMAIL PROTECTED] Source code- Código fuente: ? $based=articulo.dbf; if (($descriptor=dbase_open ($based, 0))==0){ printf (brError al abrir la base de datos); }else{ printf (brBase de datos abierta); $num_registros=dbase_numrecords($descriptor); $num_campos=dbase_numfields($descriptor); for ($i=1;$i=$num_registros;$i++){ $registro= dbase_get_record ($descriptor, $i); for ($j=0;$j$num_campos;$j++){ printf (brFila %d,Campo %d vale %S, $i, $j, $registro[$j]); } } dbase_close($descriptor); printf (brBase de datos cerrada); } ? -- 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] Help! ¡Ayuda!
Source code- CÛdigo fuente: ? $based=articulo.dbf; if (($descriptor=dbase_open ($based, 0))==0){ printf (brError al abrir la base de datos); }else{ printf (brBase de datos abierta); $num_registros=dbase_numrecords($descriptor); $num_campos=dbase_numfields($descriptor); for ($i=1;$i=$num_registros;$i++){ $registro= dbase_get_record ($descriptor, $i); for ($j=0;$j$num_campos;$j++){ printf (brFila %d,Campo %d vale %S, $i, $j, $registro[$j]); Try using a lower-case '%s' here -^ I don't think the uppercase %S means anything to printf. } } dbase_close($descriptor); printf (brBase de datos cerrada); } ? Don't know much about dbase, but the rest looks okay. -Steve -- 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] help with data bases!!!!
I'm trying to read a record from a dbase data base so I've previously opened it successfully. The problem is that I call the function dbase_get_record, but it returns no records. The database is ok because I call the funcion dbase_numfields and dbase_numrecords and they give me correct information. Would you help me, please?. Here is the source code that fails. [EMAIL PROTECTED] Estoy intentando leer un registro de una base de datos dbase, por lo que antes la he abierto con éxito. el problema residen en que llamo a la función dbase_get_record, pero no me devuelve ningún registro. La base de datos está bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código fuente: [EMAIL PROTECTED] Source code- Código fuente: ? $based=articulo.dbf; if (($descriptor=dbase_open ($based, 0))==0){ printf (brError al abrir la base de datos); }else{ printf (brBase de datos abierta); $num_registros=dbase_numrecords($descriptor); $num_campos=dbase_numfields($descriptor); for ($i=1;$i=$num_registros;$i++){ $registro= dbase_get_record ($descriptor, $i); for ($j=0;$j$num_campos;$j++){ printf (brFila %d,Campo %d vale %S, $i, $j, $registro[$j]); } } dbase_close($descriptor); printf (brBase de datos cerrada); } ?
[PHP-DB] MySQL Query
Error SQL-query : CREATE TABLE mail ( from int(32) NOT NULL default '0', to int(32) NOT NULL default '0', subject varchar(80) NOT NULL default '', message text NOT NULL ) TYPE=MyISAM MySQL said: You have an error in your SQL syntax near 'from int(32) NOT NULL default '0', to int(32) NOT NULL default '0', subjec' at line 2 Can someone please point out my error in the above query.. Thanks
Re: [PHP-DB] MySQL Query
On Sat, 27 Oct 2001 13:36:57 +1000 Andrew Duck [EMAIL PROTECTED] wrote: Error SQL-query : CREATE TABLE mail ( from int(32) NOT NULL default '0', to int(32) NOT NULL default '0', subject varchar(80) NOT NULL default '', message text NOT NULL ) TYPE=MyISAM MySQL said: You have an error in your SQL syntax near 'from int(32) NOT NULL default '0', to int(32) NOT NULL default '0', subjec' at line 2 Can someone please point out my error in the above query.. Thanks Reading the list of reserved words in MySQL, I find the two words from and to. Perhaps trying mail_from and mail_to (or whatever prefix you would like) would work better? -- Raquel It is easy to take liberty for granted when you have never had it taken from you. --M. Grundler -- 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]