hello i need the mysql code to create a table to put this code into INSERT INTO `mos_categories` (`title`, `name`, `section`, `image_position`, `description`, `published`, `checked_out`, `checked_out_time`, `editor`, `ordering`, `access`, `count`) VALUES ('Coctails', 'Coctails', 'com_garyscookbook', 'left', 'Your first Recipe category.', 1, 0, '0000-00-00 00:00:00', NULL, 1, 0, 0); when i use this code it says table not found so i need the code to go aboce it that will make the table and then insert this stuff
In order to give you the proper syntax to create the table and fields, we would need to know what each field type is. We can guess what each field's data type is based on the values you mention, but it could fail completely if those guesses are incorrect.
hmm icic mainly i was installing a script and i needed to create a table and then add those rows i belive
Well, you can create the table just with: CREATE TABLE `mos_categories`; However that will not create and define the fields. So then when you run that insert statement it will not work since the named fields have not been defined. So the process normally goes (1) create the table, (2) define the field names and types, then (3) populate the data. You have the pieces to complete steps 1 and 3, but step 2 is missing. Some of step 2 could be guessed, however some of the data types are not obvious based on the dataset.
I think your script generated from phpMyAdmin see this link managing mysql database using phpmyadmin http://www.phpeasystep.com/mysqlview.php?id=3
There is a small chance that would work, but it isn't likely. You've assumed that all of the fields are varchar. You can't make that assumption. For example check_out_time is obviously either a datetime or timestamp field, most of the last few fields are either ints, enums, etc. They are porbably not varchar fields. There might be certain fields that are indexed, certain fields that require not null data, the description field might need to be longer than you have allocated, and the script this person is using might use InnoDB table types.
everything will work if there is int but for date field he has to make changes.. but i have provided good info may be he will be able to change or if he request i will do it