Re: insert and select
Hi No you can't. if you are using and AUTO_INCREMENT field as a key you could follow the INSERT with a select statement like: SELECT * FROM tablename WHERE keyfield = LAST_INSERT_ID() See the manual: LAST_INSERT_ID() http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Miscellaneous_functions Javier Gloria wrote: Hi: how i can insert and select information at the same time. first i want to insert the information relative to the client and after that i need to select the same information on the same query. that is possible _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: ADO API ODBC Alternative help
Get your VB Manuals out, or test your programme against an Access Data Base. Once you have issed an Update statement, you need to either retrieve the record for further update or set all the fields then issue the Update statement! This is very 'Off Topic Clive Smart Kelvin Lam wrote: Hi, I am a beginner developer trying to use mySQL ODBC with ADO. I am using ADO library version 2.5, and Visual Basic 5.0/6.0 (doesn't really matter). Here is my configuration: - mySQL ODBC Version 02.50.38 - mySQL server Version 02.50.38 - Windows NT 4.0 with SP6 It seems like, mySQL does not implement all the ADO functionality. My questions will be: 1- what is the set of functions in ADO that mySQL supports? Can I find documentation about it? 2- If ADO is not fully supported, what other ways have people used for database programming? DAO? RDO? Raw ODBC API call? Now for the specific problem I have, I have this code in VB: rsTest.AddNew rsTest.Fields(login).Value = CStr(kelvin) rsTest.Update rsTest.Fields(Password).Value = CStr(testing) rsTest.Update rsTest.Fields(Fullname).Value = CStr(my name) rsTest.Update rsTest.Fields(securitylevel).Value = 1 rsTest.Update - I get an adStateOpen for both connection and recordset. - The ADO connection opened correctly. The ADO recordset opened correctly as well. - The AddNew executed without error. - The setting of login value executed without error. - When I hit the line setting value of password, I get the following message: Run-time error '-2147217887 (80040e21)': Multiple-step operation generated errors. Check each status value. What did I do wrong? Kelvin Lam Software Engineer Orbit Technology Corp 1528 Brookhollow Dr, Suite 66 Santa Ana, CA 92705 Phone: (714)427-0555 Fax: (714)427-0556 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Help with selects
Hi Alex, Try the following: if ($submit) { /* process form */ if($namequery = mysql_query(SELECT * FROM rahs WHERE name='$name') { while($set=mysql_fetch_array($namequery)) { printf ( Name: %sbr,$set[playername]); printf ($stat: %s,$set[$stat]); } } else { print Failed Query Error message here; } } else { /* other code here */ } Alex Behrens wrote: Hey Guys, I'm trying to get a form to submit to a mysql script and pull different variables when you select different values from the form, but I can't get it to work, can someone help me? Here's my code so far: ?php if ($submit) // process form $namequery = mysql_query( SELECT * FROM rahs AS playername WHERE (name = '$name')); $stats = mysql_query( SELECT $stat FROM rahs AS playerstat WHERE (name = '$name')); while($set=mysql_fetch_array($namequery)){ printf ( Name: %sbr,$set[playername]); } while($stats2=mysql_fetch_array($stats)): printf ($stat: %s,$stats2[playerstat]); endwhile; } else { I know this code is only part of it, but its the only part that needs work. I have a working model here: http://www.3d-unlimited.com/rahslax/test6.php Can someone help me get it to work? Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
PHP Security Update
From the PHP home page: PHP Security Update [27-Feb-2002] Due to a security issue found in all versions of PHP (including 3.x and 4.x), a new version of PHP has been released. Details about the security issue are available at http://security.e-matters.de/advisories/012002.html. All users of PHP are strongly encouraged to either upgrade to PHP 4.1.2, or install the patch (available for PHP 3.0.18, 4.0.6 and 4.1.0/4.1.1). I suggest that all users of PHP read the above link! Regards Clive Smart to pass the anti-spam filter: you should query the above page if you use MySQL and PHP) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LOAD DATA INFILE + NULL
Drop the quotes (') arround the NULL e.g.: 7,'Markovic Stevo',NULL,NULL Clive Smart WEBServ TomazSa wrote: I get *.csv file like this (1 string) : 7,'Markovic Stevo','NULL','NULL' When I use LOAD DATA INFILE syntax I get word NULL in field (MySQL table) q: I want field to be empty (in table), where the NULL is (in *.csv), how? tomaz, Slovenia - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: join from two different databases
Sorry, No Green Beer, No can do that ;-) Richard Reina wrote: I am try to do a join with tables that are in two different databases. I thing I've got the actual SQL syntax down: my $q = "SELECT i.inv_no, i.inv_date, c.cust_name FROM receivables.invoice i, sales.customer c, WHERE i.paid_date IS NULL"; but I am confused on how to prepare and execute it, since my database handle ($dbh) specifies only 1 database. Any help would get me out of the office on St. Pats day and in fron tof a bar maid serving green beer. Please help make my day. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php