mysql

MySQL fulltext query: search:ipod (DONT want tripod) but search:dg43nb (DO want box43nb)

Heya I need help with my MySQL product search query. Overall I'd appreciate any critique / tweak suggestions, more importantly though I have an issue.. I implemented this to stop people searching: "ipod" & getting "tripod" at the top of the list.. now my issue.. search for "dg43nb" I get 0 results but should get title:"BOXd43nb" So ...

How to find out if you have too many indexes on your table?

How can I find out if I have too many indexes on my MySQL table? For some of the tables that need to be accessed quite a lot, I've added about 2-4 indexes on the columns that will be accessed a lot. But how can I find out if they're doing more harm than good? ...

Should we be converting to PostgreSQL from MySQL?

Now that MySQL is in Oracle's hands, do you think it's a good idea to switch to using PostgreSQL for new applications instead? (Also what do you think about converting existing applications?) I've used both DB systems before and while PostgreSQL is great for it's licensing terms and standards compliance, MySQL is definitely easier to ge...

User permission table structure

Hi, I have a PHP script with many restricted areas. In each of these areas I have a function that checks if the user have access to the current area by checking the "usergroup" table. That problem is I have over 100 columns now so I'm not sure if that's a correct database design. Please advise. Thanks. ...

search keyword in mysql field which has comma separated value

I have 2 tables resumes and category. Resume table stores only the category id and the category table stores the cat id and name. Resume table category field values has comma separated value for example 1, 4, 6, 9 . Now the problem is I have to search the keyword hotel management which has the category id 6 in category table. What is the...

convert ms sql server to mysql

how can I convert mssql mdf or bak file to mysql? ...

insert if not exists else just select in mysql

I have one mysql table 'alfa' that will contain the primary key of another table 'beta' in one column. But if the entry in 'beta' can not be found I want to insert the value in 'beta' and use the new key in 'alfa'. Can I do this in one query somehow ? I currently have: INSERT INTO alfa SET c1=(SELECT id FROM beta WHERE name = 'john'); ...

What does '=>' sign in php means?

Is this an operator? I can't find it here. What does the part "$_POST as $response_id => $response" in the following code means? // If the questionnaire form has been submitted, write the form responses to the database if (isset($_POST['submit'])) { // Write the questionnaire response rows to the response table foreach ($_P...

Accessing MySQL Database from my VB.NET 2008 Project

I developed a project in VB.NET In this project I want to use data from MySQL that is resides in my WEB Server. I can communicate with the MySQL server of my localhost but can not communicate with the WEB Server. In my CPanel I added Host from the Remote Database Access But I can't communicate with WEB MySQL Server. Please help me. ...

How can I edit a view using phpMyAdmin 3.2.4?

I need to simply edit a very complicate view in phpMyAdmin 3.2.4 but I cannot figure how to do that. Any suggestions? Thanks! ...

cannot update table.

I have 3 tables: Vehicle_record Insurance Roadtax While I'm succesful in updating the vehicle_record table, the other two tables cannot be updated. When I run the query, the following error message appears: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right s...

How to generate MySQL Workbench Detailed Model Report?

Hi, I am using the 5.2.15 OSS Beta version of MySQL Workbench. I have seen somewhere MySQL Workbench Detailed Model Reports (nice HTML version of the entire Model, gives details of the schema). I don't however see any link in the workbench that can generate such a report. Is there a plugin for this or is this feature no more available n...

Problem using HSQLDB Transfer Tool with MySQL

Hi, I am trying to use the HSQLDB transfer tool to migrate a Database from MySQL. The tool is able to get the tables from the source MySQL database, however when I "start the transfer" I get the error,as follows and tables are not created in the target HSQLDB database. org.hsqldb.util.DataAccessPointException: Unexpected token: PRIMARY...

Convert javascript to date object to mysql date format (YYYY-MM-DD)

I'm trying to use javascript to convert a date object into a valid mysql date - what is the best way to do this? ...

Searching for advanced php/mysql pagination script

I'm searching for a "advanced" php Pagination script, that shows me 10 mysql entries per page. In the web there are many "simple" scripts (even with jQuery) like this: http://www.9lessons.info/2009/09/pagination-with-jquery-mysql-and-php.html Here is a demo: http://demos.9lessons.info/pagination.php These simple scripts are bad when hav...

Deleting temporary tables with a stored procedure

Hi, I have been trying to make a stored procedure which autodeletes temporary tables. CREATE PROCEDURE DeleteTemp() BEGIN DECLARE no_more_rows BOOLEAN; DECLARE loop_cntr INT DEFAULT 0; DECLARE num_rows INT DEFAULT 0; DECLARE tmptablename VARCHAR(100); DECLARE tmpTables CURSOR FOR SELECT TABLE_NAME FROM information_schema.TABL...

How to update mysql data in php properly

I'm trying to have an html form which updates mysql data. Now , I have this code(which is also a form action) and I'm trying to also use this as a form for my update. Because I will need the data that this form would show, so that it will be easier for the users to update only what they wish to update. this is the form that will search...

How do I turn off autocommit for a MySQL client?

I have a web app that has been written with the assumption that autocommit is turned on on the database, so I don't want to make any changes there. However all the documentation I can find only seems to talk about using init_connect on the database, i.e. a global setting for all client connections. Is there a way to set autocommit=0 jus...

How to select sum of column in result of select?

How to select sum of column in result of select? ...

Dont allow update on empty textbox in php

Is it possible not to update mysql data if one of the textbox in an html form which will update the mysql data is empty? ...