mysql

MySQL multiple prepared statements with same connection

What exactly are the rules for setting up multiple prepared statements simultaneously (with a single DB connection)? I often have loops that include multiple queries; it would be nice to set up 3 prepared statements, cycle through them, then close them all. What I've found is that sometimes they work together, sometimes they don't. For ...

Change Column to Auto_Increment

Hi, I asked this question a little earlier today but am not sure as to how clear I was. I have a MySQL column filled with ordered numbers 1-56. These numbers were generated by my PHP script, not by auto_increment. What I'd like to do is make this column auto_incrementing after the PHP script sets the proper numbers. The PHP script wor...

S3 File Management Skeleton - PHP/MySQL

I am looking for a skeleton framework to manage files on S3 utilizing php/mysql. My hope is that someone has already created it and I can pull from it instead of building it all myself. I am thinking something like dropbox.com Anyone know of a open source solution that I can pull from? ...

MySQL / PHP Drag and Drop File Upload

I am looking to upload files into a MySQL database using a drag and drop application. Any ideas? I want to be able to drag a file into the browser and then type in a file name. THANKS! ...

Database modeling tool to generate E-R diagrams from schema or any other tool to visually represent the MySQL DB schema

I have inherited a mysql schema with around two dozen tables. I would like to create an E-R diagram (or some form of visual representation) from my the create table statements. I am looking for free open source tools which will help me do this. This will help me understand the schema better and aid others as well. Do people have experi...

Encoded Char buffer storage Problem in MYSQL varchar using c

I have a encoded character buffer array of size 512 in c, and a database field of varchar in mysql. Is it possible to store the encoded char buffer into varchar. I have try this but the problem which i face that it only store the limited area of buffer into database and ignore. Kindly guide me that what is the actual problem is, and how ...

Are there any open source PHP software for sending mass mail, i.e. newsletter?

I have used SendStudio in the past, but I am wondering if there is an open source version using LAMP? Preferably, it should use a WYSIWYG editor for the emails, and be friendly on your average user. BTW, I'm not a spammer. Thanks ...

Help with Mysql database design

I have following entities: residential listings, commercial listings, lease listing and featured listings which holds featured properties for each user. The most logical seems to leverage supertype/subtype approach and create following tables: CREATE TABLE listings ( id ..., listPrice ..., ... PRIMARY KEY (id) ) CREATE TABLE re...

How to determine if mysqldump called from Runtime.exec() has failed.

How to find the error if the database name not exist in mysql. Database name like demo. I provide this following example code String dumpCommand = "C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump -h"+hostName+user+demo(//database name); Runtime rt = Runtime.getRuntime(); Process proc = rt.exec(dumpCommand); I...

Connecting to remote MySQL via local machine

I am trying to connect to a remote MySQL database via PHP that is installed on my local windows computer. MySQL Version: 5.1.43 The remote database is set up to accept connections from my IP but I keep getting this error: Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected in "my file here" Warn...

Creating multi-dimensional array from DB

Hi I really hope someone can help me with this. I'm struggling with it for nearly two days now... I have a DB-table "Device" and a table "Connection". I'm using it to visualize my company's network. To pass the data to the JS-framework I use to visualize the data I need an array like this: Array ( [id] => 1 [name] => TestPC1 ...

Mysql retrieve all rows with limit

I want to retrieve all rows of a particular user with limit 0,x.. So i just want to ask is there any way to retrieve all rows in mysql without calling a method which returns count(id) of x& without making an overload of existing function which does not have limit at all in query & withour string.Relace() functionality. As internally m...

Problem while importing mysql backup

Hi, While I'm trying to import mysql backup file i receive such an error, ALTER TABLE `sf_guard_group_permission` ADD CONSTRAINT `sf_guard_group_permission_FK_1` FOREIGN KEY ( `group_id` ) REFERENCES `sf_guard_group` ( `id` ) ON DELETE CASCADE , ADD CONSTRAINT `sf_guard_group_permission_FK_2` FOREIGN KEY ( `permission_id` ) REFERENCE...

error updating mysql data through php

I try to update the data making use of checkboxes. But when one or more of the checkbox is not checked. A notice is returned: Notice: Undefined index: stats2 in E:\wamp\www\HOSPITAL\update.php on line 12 Notice: Undefined index: stats3 in E:\wamp\www\HOSPITAL\update.php on line 12 Notice: Undefined index: stats5 in E:\wamp\www\HOSPITA...

How to count all NULL values in a table?

Just wondering, is there any quick way to count all the NULL values (from all columns) in a MySQL table? Thanks for any idea! ...

SQL required to showthe highlights of a database on a website homepage

Hi, Wikipedia http://en.wikipedia.org/wiki/Main_Page , has sections like: Todays featured article, From the news, Did you know etc. Say in my page, I want to get the main highlights from the database table(s) (multiple databases possible), what is the best possible way to query? I mean create separate connections and then quer...

escaping special character in mysql statements while using UPDATE...

I am trying to update a field using UPDATE table set field='some_variable' where id=1; The problem here is that the some_variable comtains data with multiple special characters in it. so I am not able to use 'some_variable' or "some_variable" as it breaks and fails when it encounters the first same character(' or "). How can I overco...

How to SELECT a column held in a local variable in MySQL?

I have a variable holding the column name. I want to do a select with it like this way select `@x` from table; Is it possible? ...

php & mySQL: Selecting Multiple Books and showing their info in next screen

Hi all, Let me illustrate this with an example. Consider there are 10 books (there may be more, even 100+ on a single screen). A customer can order any number of books. In the fontend, each book is represented in a row and the book details are arranged column wise. Now the 10 books (along with their details) are shown in 10 rows. BOO...

Load mysql's value into javascript

i have stored values in mysql and i want to retrive that value in webpage but the webpage is creted only using javascript so how can i use that database's value in javascript ...