[QUERY] Problem with Syntax/Query. Need Help Please.
G'Day All. I'm trying to do the following in a query, in mySQL. All my previous years of SQL has been on MS-SQL, and i'm having some little problems with tricky sql statements. * i'm trying to insert a new record if the name doesn't exist in the table. If i insert, return ID, else return 0 * pseduo -sql syntax SET NOCOUNT ON DECLARE @intPersonID INTEGER SELECT PersonID from tbl_PERSON WHERE Name = @strName SELECT @intPersonID = @@IDENTITY IF @intPersonID 1 BEGIN INSERT tbl_PERSON (Name, Surname) VALUES ('TestName', 'TestSurname') SELECT @intPersonID = @@IDENTITY END ELSE SET @intPERSONID = 0 end psedu untested code I have NO idea how i can do this on MYSQL.. Any help would be extreamly appreciated. -Regards : Pure Krome- - 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
[NEWBIE] How to install MySql++1.7.9?
Hello All. *disclaimer* I'm blond. I'm a linux newbie. I've searched the mailinglist/newsgroup archives. *end disclaimer* I'm trying / wanting to install mysql++ on my MANDRAKE 8.1 LINUX MACHINE. That means i'm running GCC/G++ VERSION 3.0.1 Could someone please be kind to explain IN DUMB SPEAK for a newbie like me, EXACTLY what i should do to install mysql++ ? Should i install it as ROOT? or just the normal account i normally use [user == pure]? I have mysql running already... mysql 1950 0.0 1.4 27064 4576 ?SNov01 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysq... so, could someone please explain what to do exactly please. ie. 1.log in as user 'pure' into shell 2. download file into pure root home directory [from where?] 3. download patch 4. rpm -vhi downloaded file 5. run patch 6. do this 7. do that 8. headbutt monitor 9. goto 6. etc.. etc.. i do appologise if this sounds very lame, but i'm fed up with trying to figure this stuff out by myself and i'm running out of time. Thank you dearly in-advance to any support i receive. Regards - Pure Krome, Melbourne, Austrlia [Note: This message has also been posted to USENET, mailing.database.mysql] - 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
[NEWBIE] How to install MySql++1.7.9?
My deepest appologies folks. I posted this to the wrong mailing list. Sorry for the spam. *bows low* I will now post this to the correct mailing list [[EMAIL PROTECTED]] Terribly sorry. -PK- [Filter bypass keywords: database,sql,query,table ;) ] - 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