mysql

Should I split the data between multiple databases or keep them in a single one?

Hi, I'm creating a multi-user/company web application in php & mysql. I'm interested to know what the best practice is with regards to structuring my database(s). There will be hundreds of companies and thousands of users of this web app so this needs to be robust. Each company won't be able to see other companies data, just their ow...

INSERT command inserting duplicates

I am writing a quiz website. What should happen is: A page has a question on it and four buttons or a textbox. When you click a button, it calls itself with the answer number in the address like: ?q=[question number]&a=[answer]. If the question uses a textbox it POSTs the answer. This code should then detect that something has been...

Tcl Starkit with MySql

Hello: Does anyone know what files are required for MySql to work with a Tcl Starkit? Currently, I have libmySQL.dll, libmysqltcl.dll, and pkgIndex.tcl. The pkgIndex.tcl has the following code: proc loadmysqltcl {dir} { set oldcwd [pwd] cd $dir load libmysqltcl[info sharedlibextension] cd $oldcwd } package ifneeded mys...

What is wrong with this JOIN query?

I have a list of tenant reports, each link pointing to a report ID. I need this query to select the report information, and some of the information related to the tenant who submit it. This query gets the report information correctly, but returns copies of it with every tenant attached to it: SELECT reports.person_reporting, reports....

Zend: Creating models for a products table

I'm trying to create two models, products and product_manufacturers so that I can pull in manufacturers as well as products, edit them in the admin if necessary, and the usual CRUD stuff. Here's the schema for the tables ( it's not finalized so if you have any suggestions go ahead ). CREATE TABLE `product_manufacturers` ( `id` int(11)...

"Warning: Cannot modify header information - headers already sent by" error

i keep receiving this error each time i try to submit the a form deletion form. Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\speedycms\deleteclient.php:47) in C:\xampp\htdocs\speedycms\deleteclient.php on line 106 is there something wrong with my code? what do i ...

Does a MySQL, PHP, JSON framework exist?

I'd like to query a MySQL database via a RESTful service with the middleware being PHP. I'd like the output to be JSON. I'm a beginner in those areas. Are there any frameworks or scripts that can do this without requiring you to be an expert? I don't have a problem stringing a few scripts together if they can work. Or, if it can be don...

blogengine and mysql .net connector - fail to connect to db

hi, ive got a problem when trying to connect to a mysql db for blogengine (1.5.0) using mysql .net connector. im getting "Unable to connect to any of the specified MySQL hosts" error. [SocketException (0x273d): The attempted operation is not supported for the type of object referenced] System.Net.Sockets.Socket.get_ConnectEx() +305...

Punctuation insensitive search in mySQL

I have a database of phrases that users will search for from their own input. I want them to find the phrase regardless of what punctuation they use. For example if the phrase, "Hey, how are you?" is in the row, I want all of the following searches to return it: "Hey! How are you?!" "Hey how are you?" "Hey :) How are you?" Right no...

Rails / Snow Leopard Mysql 64-bit question

Hey all, I'm trying to install 64-bit MySQL on Snow Leopard for a rails app. I've installed it from the dmg and I can get to mysql fine from the command line. Based on various blog posts as well as the other topics here on Stack, I shut down mysql, uninstall the mysql gem, and then try to update the gem with the following: sudo env ARC...

PHP Update table Inserts blank fields

UPDATE: I narrowed it down, when I got rid of this tag in the header.php file it all works, can someone please explain this. <script src="#" type="text/javascript"></script> Hi I'm having quite an annoying issue with my php code. I am trying to update a php database, from a form, when I do this however the fields in the data base beco...

How to match 2 out of "1,2,7,9,13,3,10,4,21,6,12" in MySQL?

I'm not familiar with regex in MySQL. ...

MySQL select multiple values from column

Here is the table ID WHO FRUIT 1 Adam Apple 2 Adam Lemon 3 Eve Apple 4 Adam Grape 5 God Papaya 6 Eve Melon How do I get all persons who have apple and lemon: in this case, so that I get the result Adam? Furthermore, I want all persons who have apple and lemon or melon, so I would get Adam ...

Why does insert from php to mysql mis-handle question marks sometimes, but from command line never?

I have a simple table: describe chat_public_messageboard ; +--------------+---------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+---------------+------+-----+---------+----------------+ | message_id | int(100) | NO | PRI...

mysql - strange schema behavior in MySQL Admin

Hi - I am running several schemas on a single mysql server. One of the schemas has an underscore in its name ("some_name"), and the rest don't. I noticed that in the Admin GUI I am seeing 2 schemas that represent the same one, with one having an escape character before the underscore - so in the schema list I see: schema1 schema2 some_...

Trying to learn MySQL and transactions

Over the last couple of days I have tried to write an Stored procedure in MySQL and I have some truble getting it to work. Hope someone here can give me some input :) The example I post is for asp.Net Membership provider to create a new user. I expect to send email and password to the DB and get an int return to verify that the userdeat...

Mysql Views with Index

Possible Duplicate: Is it possible to have an indexed view in MySQL? Possible duplicate: http://stackoverflow.com/questions/244226/is-it-possible-to-have-an-indexed-view-in-mysql Is it possible to create Index for Mysql Views Like Tables? ...

MySQL vs. SQL Server vs. Oracle...

Hi Guys, I have always only used MySQL and no other database system. A question came up at a company meeting today and I was embarrassed I did not know: To a developer, what earth-shaking functionality do MS or Oracle offer that MySQL lacks and which allows MS and Oracle to charge for their systems? ...

mysql random value change

I have a database in mysql with 1 table composed by 5 fields. Two of these fields are FLOAT and generated by RAND function; now i want to change these values each x time, for example numeric values have to change every 0.01 s to simulate a financial market. Is there a method to do this thing? Thanks ...

which mysql 32 / 64 bit

How good it'd be to have 64 bit MySQL on 64 bit Linux ofcouse? Presently I have 32bit Mysql / OS but 64bit hardware. Shall I consider upgrade? What advantages do I have? ...