Very Basic Database Search
Have a very basic database of contacts that I want to make searchable via PHP. Have successfully constructed the database, and can connect and get a basic search, but not sure how to get what I want.
Table name: Business
Fields:
ID (key),Name,Address,City,State,Zip,County,Region,Phone,Fax,Email,Category (4 main categories),Type,Web,Contact
Vision for search page: unified search, possibly with Category field being main selection (checkboxes, maybe), then refining search by City, County, Region, Type only. Results will be set off in a <div> to the right.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Help With Basic Database Structure
Just need a little help or advice on how to set my database up? I want the users to login with there email & password and be linked to a certain date and selection of photos, a great number of users will also be linked to the same date and selection of photos. My main problem is what to index and how best to link these users to the content in the columns? Will I need to create two tables? Or keep it as one? fn & ln are really just for a refrence. My columns: first_name last_name email password photos date
Basic Database Design
I have a table called 'nms_apps' which stores information about all of our applications which we have developed/maintained for our client. One column which I would like to use is called 'used_by', which would store information about which business sections (Financial Management Branch, Human Resources Branch, etc.) use a particular application. Often times more than one section use a particular application. My question is this: How do you handle multiple entries in one column? Is it acceptable to more than one value in a column for one row? If not, what is the best way to design that in the table? Have multiple 'used_by' columns? 'used_by_1', 'used_by_2', 'used_by_3', etc.? .
Basic Database Design
DB novice checking in here with a basic design question. I have a table called 'nms_apps' which stores information about all of our applications which we have developed/maintained for our client. One column which I would like to use is called 'used_by', which would store information about which business sections (Financial Management Branch, Human Resources Branch, etc.) use a particular application. Often times more than one section use a particular application. My question is this: How do you handle multiple entries in one column? Is it acceptable to more than one value in a column for one row? If not, what is the best way to design that in the table? Have multiple 'used_by' columns? 'used_by_1', 'used_by_2', 'used_by_3', etc.? .
Basic Question About Database Structure
This is probably an FAQ, but i cant seem to find the answer Say i want to make a comment system for my website, where anonymous visitors can leave a comment about a particular document. I have 1600 rows, each id being a document. I want to be able to save several comments for each document. Is it best to create one table, and insert each comment as a row with a column that represents the ID of the document. Or should i create a new table for each document/id and save the comments to that table one per row? Im thinking the best way is the first method, one table, many rows. Im thinking that if however my website ends up getting 36 million comments, i could speed it up by making a table for each document.
Search: Remove Quotes From Database For Search
I am making a book site and currently in the database are book titles likes "John's Trip" and "Peter's new bike". I have a search function where the customer can type in "Peter's" and it will bring up everything with "Peter's" in it. But i was wonderind is there any way i can search for "Peters" and "Johns".
Database Search
how to setup a search engine for my database. Right now I have 4 different tables, all relating to each other thru different keys. I currently use a search for where you must use drop downs to fill in text fields. I want to change over to a search system that is just one text field that searches all the fields. First question, do I need to create an additional table for keywords? If so, how do you keep that up to date? I get photos and information added every hour. Do I need to look into a full text search or something different than the simple search/where?
Search The Whole Database
Is there a way to search all tables in a database for a keyword using 1 query? Something like SELECT * FROM ??? WHERE ..ummm you know what,,I cant do it ,,please help
Database Search
I am looking for a query that will search all of my database without having to use all the individual table names and fields as there are 6 tables and over 30 fields in the database is there any special expression for this the search criteria would only be one word.
Search & Replace In Database?
I want to change a website from XHTML to HTML, so I have to get rid of my closing tags, such as... <meta tags /> <image src="" /> <br /> I can clean up most of my site with Dreamweaver's search and replace function. Is there a way to do something similar with my database, preferably using phpMyAdmin? If so, will it let me use regex (for meta tags and images)? Also, I know how to use phpMyAdmin's Search function, but is there a way to search for a specific item in a field, like " />" or "<br />"?
Search Database Query
I am looking for a query that will search all of my database without having to use all the individual table names and fields as there are 6 tables and over 30 fields in the database is there any special expression for this the search criteria would only be one word.
How To Search Mysql Database Using Php
in my mysql database table, i have 1. "this is mysql practice search test" 2. "that was my mysql practice search test" if i use ** "SELECT * FROM `table` WHERE `def` like '%mysql%' order by id" it returns both rows but .. if "SELECT * FROM `table` WHERE `def` like '%mysql my%' order by id" doesn't return anything. how to search table with more than one word from that may be in same field or different field of any row of table.?
Techniques Available To Search A Database
Can someone provide a list of the most common techniques used to search a database for matches based on user-entered keywords etc? At this point the only SQL syntax I'm aware of to search a db is using the LIKE clause: SELECT article FROM mytable WHERE article LIKE "php variable"; Is this an efficient enough way, even for a large table? For example, what kind of algorithm do commercial scripts like VB or blog use to search its content?
Database Search Approaches
can i put together a site search tool for a e-comerce site that draws from a mySQL database. They are currently using a tool (Swish-e) that relies on an index of their site. I don't know a lot about searches & it got me wondering if it is faster to query the database directly or may a daily index and search that, like they are currently doing? I don't believe they get a ton of hits on their search engine. I think they get around 120 orders a day, if you can deduce anything from that. I'm also curious about the flexibility I would have to modify the way the program searches in the future. If I were using an indexed version it seems like it might be hard to produce advanced searches (all <color> tv's from <manufactuer>)
Basic
Which would be better for a website that would be constantly updating its articles (some are pretty long), 'flat-file database' or MySQL? Could MySQL handle large articles as entries or is it supposed to be done some other way? I'm not clear on how this works... As of now I'm thinking of using PHP which would 'call' txt files to fill in the articles that way it would be easy to update the articles- just add to the txt file or have it call another one...
Basic SQL
The table Arc(x,y) currently has the following tuples (note there are duplicates): (1,2), (1,2), (2,3), (3,4), (3,4), (4,1), (4,1), (4,1), (4,2). Compute the result of the query: SELECT a1.x, a2.y, COUNT(*) FROM Arc a1, Arc a2 WHERE a1.y = a2.x GROUP BY a1.x, a2.y; Which of the following tuples is in the result? a) (2,3,2) b) (2,4,6) c) (4,2,6) d) (3,2,6)
Basic
1. how can I login to the server using login script from command line. (As when you use cmd from MySQL program menu, 'root' user already taken as user and ask for password.) 2. how can I switch to another user if I have connected as another user already(I am at mysql> prompt and using database) 3. how can I create another user like root with all the admin rights (cos I want to disable 'root' user and instead of using self created admin user)
Basic SQL Help
Having some trouble coding here.. ITs basic so you guys will prolly nail it easy. Heres the question: 12.display Student_Name, Apparatus_Id and result for all students who achieved a result higher than the average for each apparatus list the highest results first, within each apparatus. The tables are student_name, student_id, school_id, apparatus_id, apparatus_name,
Basic Row Count
I need to know how many rows are returned that satisfy my query. CODE my $data = qq(SELECT search, engine, time FROM searches WHERE UNIX_TIMESTAMP(DATE_SUB(CURDATE(),INTERVAL 7 DAY)) <= UNIX_TIMESTAMP(time));
Basic Mysql
i need some basic help to get me started with mysql my server is running ( mysqld as root gets it running) in the terminal window i have typed in commands like mysql create database my_data nothing seems to happen a blank line i try mysqladmin same thing what am i supposed to see after i type in commands like these? i have done some homework but still confused i am evaluating mysql as a database tia
Basic Index
I've a geolocation-table (MyIsam) with three rows: id (int), lon (int), lat (int). There are two different types of queries: ... WHERE lon=? AND lat=? ... WHERE id=? Which index-model has the best performance? A - single index over all 3 rows B - index (id) and index (lon,lat) C - separate indices for each row
Mysql Basic
There are PHP commands and there are MySQL commands. To access the database, do I use PHP or MySQL commands?? If it's MySQL commands, do I put them in <?php ?? I've been reading PHP and MySQL for a couple weeks now, and I don't see the connection. Obviously there's something I'm missing?
Basic MySQL
I downloaded MySQL. My question is this, what do I do now?
Basic AND OR Statement
how do I get mysql to evaluate what in the brackets first like x = (4 + 5) * 4; the query im using is below. basically what im trying to get it to do is if the text "sad" appears in about or career fields and the userid on that row = 6 return true SELECT * FROM user_resume WHERE (about='%sad%' OR career='%sad%') AND userid='6'
Basic SELECT Question
An SQL question for some SQL Wizard. Is there a way with SQL (MySQL, namely) to re-interpret values and return strings based on the contents of the field. Boy that was clear... maybe an example would help... e.g. say my col1 database field has these values col1 a1 a3 a2 a1 I want to return "My String 1" for a1, "My String 2" for a2 and "My String 3" for a3. So when I run my query: SELECT col1 FROM myTable it would return: My String 1 My String 3 My String 2 My String 1 Obviously I could do this in the server-side code layer, but it would solve a few issues if I could do it directly in the SQL. Possible?
Basic MySQL Indexing
I have a fairly large database on my (2 million records) WIN32 mySQL 4.0.20 The question is: I am adding large amounts of data to it (300,000 to 500,000 at a time) with the standard (INSERT INTO) command. Question is, do I have to reindex, and when and how often? Does mySQL automatically build indexes on the fly as I add data? If I do have to reindex, is there a command that will rebuild all the indexes for that table (I have 4) ???
Basic Replace Query ?
I am trying to do a very basic sql query in mysqladmin I want to query the table and for every records where the email address = xxx replace it with yyy So far I have got Replace Into tblUser where Email = xxx Values (yyy) but this doesn't work.
Basic MySQL Indexing
I have a fairly large database on my (2 million records) WIN32 mySQL 4.0.20 The question is: I am adding large amounts of data to it (300,000 to 500,000 at a time) with the standard (INSERT INTO) command. Question is, do I have to reindex, and when and how often? Does mySQL automatically build indexes on the fly as I add data? If I do have to reindex, is there a command that will rebuild all the indexes for that table (I have 4) ???
Basic Performance Question
If I have a database with some tables that are very rarely accessed, do the data on the these tables effect performance of the database.. What I mean is if I have 99 tables with many records and columns that are rarely accessed does this effect the one table that is accessed frequently, or does the data just remain on the disk until the tables are accessed..
Visual Basic .NET Connection
How do I connect to mySQL through the Visual Basic .NET Stanard enviroment? I downloaded all the OCDB drivers but can't connect because "You can only connect to SQL or Access databases".
Extreme Newbie (using A Mac) Needs Basic Help
I bought the book "MySQL Tutorial" and immediately I am confused. I installed MySQL on my Mac, but immediately I am having questions regarding it's use. Am I to type these commands into the Terminal?
MySQL Basic Information
I'm now using Access w/ VB6 and I'm thinking of switching to MySQL. What are the costs involved? What do I need to download?
Basic Install Script
any existing basic installation scripts where the user can. 1. Enter their dbname, username, pass, and table prefix. 2. Test for a connection. 3. create a config file. 4. insert some default data
AES_ENCRYPT In Visual Basic
I'm writing an app with vb & mysql. for the user login - i tried aes_encrypt and vb reports function or sub not defined.
Openssl Visual-basic
i have to write a client-application thats will send and receive data from a webserver using a mysql database. the connection requieres ssl. has someone an idea how i use openssl in visual-basic(6)? i have no idea which functions or in which order i need to get a connection. i have read two days the documentations, comments, everything. the only thing i have found was the function mysql_ss_set(..) on theses sites. but what comes after this function?
Real Basic Question
Table Log ( transid varchar(12) NOT NULL default '', ref varchar(24) NOT NULL default '', date datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (transid) ) TYPE=MyISAM CHARACTER SET utf8; This is being populated fine, I need to get a query right. Example data: 1 Apples 10-Oct-2005 10:27 2 Apples 10-Oct-2005 10:28 3 Oranges 10-Oct-2005 10:28 4 Pears 10-Oct-2005 10:28 5 Apples 10-Oct-2005 10:29 6 Banannas 10-Oct-2005 10:30 I need to produce a summary which hows how many refs in total there are along with the last date. The result would be Apples 3 10-Oct-2005 10:29 Oranges 1 10-Oct-2005 10:28 Pears 1 10-Oct-2005 10:28 Banannas 1 10-Oct-2005 10:30
Basic MySQL Theory
I'm trying to create a database, and although I have no problem working with mySQL, there are a few "basic theory" issues I've never dealt with before. Basically, all I really want to know is the "standard practice" when creating databases to be used with websites. For instance, assuming that each "article" of a website has multiple paragraphs, would that mean that each paragraph would have it's own table cell? For example, I'm envisioning creating a "text" table with all the text to be used for the site with the article name to be used as the key, i.e.: ARTICLENAME(key) TEXT1 TEXT2 TEXT3 TEXT4 TEXT5 exampleTitle exText... exText... exText... exText... exText... If this were the case, then how would headings work? I was thinking that you would have a "headings" table, but then you would have to specify a number for how many paragraphs would go under each heading (assuming the amount of text per heading varies per article). Of course I could just go ahead and CREATE my database in this way, but it somehow seemed kind of like re-inventing the wheel, and for all I know there is a completely standard (and ideal) way of doing this when it comes to something as common as articles for a website.
Basic Query Doubt
I have two columns in the table product_name and product_description I wan to construct a query for search so that if the keyword 'purple' is searched for, first all records with purple in the product_name should come up followed by product_description.
Basic Inner Join Statement
Given two tables, one called shop, the other shop_market, I am trying this statement select * from shop inner join shop_market on shop.id = shop_market.shop I get an error that says shop.id does not exist when in fact it does...
How To Connect Visual Basic With Mysql
Small help needs :I want ot know how to connect Visual basic with mysql .i could be able to connect locally but i couldn't be able to connect on server(website) . Whether i need to install ODBC mysql driver needs to be install on server.
A Basic Mysql Relationship Question
cREATE TABLE Topic ( Topic_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, Topic_name TEXT, Topic_info TEXT ); CREATE TABLE Img ( Img_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, Img_name TEXT, Img_author TEXT ); What i want to do is include the Img_ID in the Topic table(as a foreign key??) so i can refer to it through that table. do i do it like this: CREATE TABLE Topic ( Topic_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, Topic_name TEXT, Topic_info TEXT, Img_Id INT NOT NULL AUTO_INCREMENT FOREIGN KEY, );
Basic Sorts - How To Group Items Using Id Tag?
Greetings - I am a absolute newbie to PHP/MySQL and would appreciate kickstart help I have attempted tutorial at DMX Zone but failed without success. See http://www.dmxzone.com/showDetail.a...d=2&NewsId=4937 Basic Setup: Database: MySQL id Name 0 Fruit 1 Banana 1 Pineapple 1 Kiwi Fruit 1 Apples 0 Vegetable 6 Tomatoes 6 Peas 6 Carrots Output required: Fruit Apples Banana Kiwi Fruit Pineapple Vegetable Carrots Peas Tomatoes Requirement: Depending on designated id, all items starting with 0 become bold category headings listed in alphbetical order and all associated products matching that category would be listed - also in alphabetical order.
Basic Nav Buttons And Record Lock
Is there a available set of nav buttons, i.e. next prev last top available to work with PHP of course? Is there a record lock in mysql so I can lock just the record and not the whole table while I edit just that record but not prevent others from seeing it?
Basic Insert And Display Improvements
You add a simple signiture to the database and it displays it above once you click. See in productions on my website. Anyways, I need some ideas to make it better. Any Ideas?
How To Start MySQL Server From Visual Basic
I'm developing a system in MSExcel that uses VBA and Excel forms for the front end, whilst using a MySQL server local to each machine to process the data in the background. On starting up the Excel system I want to:- a) (if necessary) check whether or not the MySQL server is running on the machine b) (if necessary) start the server
Trying To Access Names Of Tables From Visual Basic
I am trying to get a list of the various tables in a MySQL database. I can connect to the database with the following code: Set cnn1 = New ADODB.Connection cnn1.ConnectionString = "DSN=MyODBC;UID=root;PWD=password;" cnn1.Open If I'm using an access database I simply do: With SelectedDatabase For I = 0 To .TableDefs.Count - 1 cmbAccessTable.AddItem .TableDefs(I).Name Next I End With How can I access the names of the various tables in MySQL database?
Basic Install Script And Table Prefix
I'm looking to try my hat at developing my own little game. It will likely take me months to get it all worked out. But to help me in getting started, would anyone know of any type of basic install script (or tutorial) on how to have the user input their db information and table prefix to populate a database with the required sql tables?
Cannot Create A Basic View Nor Stored Procedure, Error 1064
I need to do is to be able to create a view or a stored procedure. I am using the basic, "create a stored procedure" tool via that button in MySQL Administrator. Anyway, my extremely basic view continually breaks. I have a database called "bugs" from Bugzilla. I need to add a view to it. When I try and add this view, I get the 1064 syntax error. CREATE OR REPLACE VIEW `bugs`.`view_MyBugsDescription` AS SELECT * from bugs That should work. If I were using MS SQL Server, I would have finished this hours ago. What do I need to do with MySQL. My version of MySQL Server is 4.1.20. MySQL client version is 5.0.11.
|