View Full Version : Looking for Documentation
10-29-2002, 07:19 PM
Hey all I am looking for some kind of documentation/tutorial. What I am looking for in this tutorial is examples how to create a script with some kind of if logic.
The reasoning for this is when I am writing small scripts for sql tables i want to create the database if it doesn't exist.
if anyone could send me in the right direction it would be great.
Thanks in advance.
10-30-2002, 10:18 PM
well i figured this out. In case anyone else is curious on how to add if logic to a sql script you simply do this;
create database if not exists dbname;
create table if not exists tablename(tablevalues....);
10-30-2002, 10:52 PM
it's all right there in the mysql documentation:
10-31-2002, 07:36 PM
hahaah yeah thanks, I just wasn't paying too much attention to the documentation, as well as I wasn't looking in the documentation in the right sections. But after hours of frustration I finally realized what was going on :) Thanks for the links though I know I will be there quite often :)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.