Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > MySQL > Sprocs??????

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-19-07, 16:03
Brett Kaiser Brett Kaiser is offline
SQLTeam Scrub
 
Join Date: Nov 2002
Location: Jersey
Posts: 9,127
Sprocs??????

Does mySQL have them?

got a sample syntax?
__________________
Brett
8-)
My Blog dbforums Yak CorralRadio 'Rita
dbForums Member List SQLTeam Member List
It's 5:00 Somewhere Pearls
The physical order of data in a database has no meaning.
Reply With Quote
  #2 (permalink)  
Old 09-19-07, 16:33
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,556
avast, ye lazy landlubber, have ye no internet connection? can ye not reach the mysql.com site?

here ye go, ye flea-bitten scurvy knave...

http://dev.mysql.com/doc/refman/5.0/...rocedures.html
__________________
r937.com | rudy.ca

pre-order my book Simply SQL from Amazon
Reply With Quote
  #3 (permalink)  
Old 09-19-07, 16:35
mike_bike_kite mike_bike_kite is online now
Registered User
 
Join Date: Jun 2007
Location: London
Posts: 955
Yes - from version 5 upwards.

Procedures look like this :
Code:
drop procedure if exists db_log_action; $ create procedure db_log_action( IN in_user_id int, IN in_logType varchar( 20 ), IN in_logMsg varchar( 200 ) ) begin if in_logType != 'test' and in_logMsg != 'Searching for logs' then insert db_Log ( id, logType, updTime, msgTxt ) values ( in_user_id, ifnull(in_logType,'error'), now(),ifnull( in_logMsg,'EMPTY') ); end if; end $

Functions work well too:
Code:
drop function if exists db_return_hello $ create function db_return_hello( in_name varchar(250) ) returns varchar(250) begin declare v_str varchar(250); set v_str = concat( 'Hello ', in_name ); return v_str; end; $

Mike
Reply With Quote
  #4 (permalink)  
Old 09-20-07, 11:42
Brett Kaiser Brett Kaiser is offline
SQLTeam Scrub
 
Join Date: Nov 2002
Location: Jersey
Posts: 9,127
Thanks guys

I'll go look at the link Rudy, but where can mySQL be installed?

Does it need a server?
__________________
Brett
8-)
My Blog dbforums Yak CorralRadio 'Rita
dbForums Member List SQLTeam Member List
It's 5:00 Somewhere Pearls
The physical order of data in a database has no meaning.
Reply With Quote
  #5 (permalink)  
Old 09-20-07, 11:51
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,556
if you are developing, i would recommend installing it on your C drive

i managed to do it, and it was dead easy

but please don't ask me for particulars, i am ~so~ not a DBA
__________________
r937.com | rudy.ca

pre-order my book Simply SQL from Amazon
Reply With Quote
  #6 (permalink)  
Old 09-20-07, 15:44
mike_bike_kite mike_bike_kite is online now
Registered User
 
Join Date: Jun 2007
Location: London
Posts: 955
If you have a server or web space on a server then you'll probably find it already has mysql. There usually an admin page to turn it on and set an admin password.

It's not diffiicult to put on your own PC but then it's more of a game writing web apps (assuming that's what you want to do) if the db's on your PC. You can pull the exe from their site.

Good luck

Mike
Reply With Quote
  #7 (permalink)  
Old 09-21-07, 05:21
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 5,460
if you are planning unsing MySQL one thing to bear in mind is the MySQL does have one really really annoying feature... the Windows variant, like most Microsoft applications is case insensitive, whereas the other versions are case sensitive..

so you can develop an app happily on a MS hosted MySQL server, and find it passes all manner of testing.. but you come to grief on a Linux or other server, becaue of CaPiTaLiSaTiOn
__________________
Warning
May! contain traces of NUT. people with NUT allergies should not pay attention to any of the above
Reply With Quote
  #8 (permalink)  
Old 09-27-07, 11:01
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 734
If you want a development environment on your pc then google XAMPP
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On