mysql

use result set of mysql stored procedure in another stored procedure

I have a MYSQL stored procedure SP1() that returns a result set. I want to call SP1() inside of SP2() and loop through the result set of SP1() to do some additional work. I don't want to include my logic from SP1() because it would make SP2() too complicated. Any suggestions? Thanks. ...

Database design in blogging systems

As a learning exercise I'm trying to put myself a blogging system. The goal is to code something that will let me create multiple blogs, like blogger.com or wordpress.com, but much simplified. I would like to ask you, what do you think is best database design for this type of script. Is it better to have one big table, containing po...

MySQL field type for a comments field or text area

As the title says, I'm after a good field type for a comments field I have in a table. It will store many characters (as users can continuously add to it) so it's definitely over 255. I looked at longtext but wasn't sure...Also how do I change the field type to accept different characters such as apostrophies. Thanks. ...

Adding metadata attributes to MySQL table

I would like to add custom attributes to a MySQL table which I can read via php. These attributes are not to interfere with the table itself - they are primarily accessed by php code during code generation time and these attributes HAVE to reside in the DB itself. Something similar in concept to .NET reflection. Does MySQL support any...

Good tutorial on how to update your Mysql database with a PHP form?

Looking for a good tutorial on how to update a mysql database using a php form? ...

Pagination links broken - php/jquery

Hey, I'm still trying to get my pagination links to load properly dynamically. But I can't seem to find a solution to this one problem the problem I am having is when I click any of the pagination number links to go the next page, the new content does not load. literally nothing happens and when looking at the console in Firebug, nothin...

Read from multiple tables in vb.net data reader

I'm trying to read from two tables in mysql: Dim sqlcom As MySqlCommand = New MySqlCommand("Select * from mother, father where IDNO= '" & TextBox14.Text & "' ", sqlcon) -But I get this error: Column 'IDNO' in where clause is ambiguous Here is the whole code: Dim NoAcc As String Dim NoAccmod2 As String Dim NoPas A...

Is there a function in mysql to get the MBR(Minimal Bounding Rectangles) of Geometry?

I found that some result of MBRContains(g1,g2) and other functions seems not right to me. and I want to find out why. how to see the mbr? ...

Problem reading from 3 tables in mysql

What do I do, I need to fetch data from 3 tables in mysql, here is my current query. All of the tables contain the IDNO which has 03A45 number. But this query isnt returning any results: SELECT * FROM father, mother, parents WHERE father.IDNO=mother.IDNO=parents.IDNO AND mother.IDNO='03A45' AND father.IDNO='03A45' AND p...

Pulling data and printing it in an HTML table

Hello, From a MySQL table called "submission" containing the fields "loginid, submissionid, title, url, datesubmitted, displayurl", I would like to print an HTML table thats contains all "title" and corresponding "datesubmitted" where "loginid" equals "$profile." The code I am trying to use is below. It isn't working. Any ideas why i...

Fatal error encountered during command execution with a mySQL INSERT

I am trying to execute a INSERT statement on a mySQL DB in C#: MySqlConnection connection = new MySqlConnection("SERVER=" + _dbConnection + ";" + "DATABASE=" + _dbName + ";" + "PORT=" + _dbPort + ";" + "UID=" + _dbUsername + ";" + "PASSWORD=" + _dbPassword + ";"); MySqlDataAdapter adapter; DataSet dataset = new DataSet(); co...

dynamically specify data type for a column in mysql?

i have one problem that, i have to change type of data in column based on foreign key stored in that row. unit_id unit_name 1 String 2 Float 3 Date 4 Int Id spec value unit id 1 "A" 1 2 30.90 2 3 null 3 4 100 4 now i should ach...

MySQL - What's wrong with the query?

I am trying to query a database to find the following. If a customer searches for a hotel in a city between dates A and B, find and return the hotels in which rooms are free between the two dates. There will be more than one room in each room type (i.e. 5 Rooms in type A, 10 rooms in Type B, etc.) and we have to query the database to ...

I am looking for good free reporting tool for MYSQL databases (web or windows)

Hi Can anyone please suggest me a good free mysql based reporting tool which works either on web or windows? Thanks and Regards ...

How to configure tomcat 6.0 for mysql

I'm using Tomcat 6.0, and I want to know how can I configure Tomcat's server.xml file to connect to mysql database, and enable form based authentication in java. I'm currently using mysql 5.1, and I've already downloaded mysql connector jar file, and put in lib directory of Tomcat. ...

Exclude results where two fields are not of certain values

I have two tables which have some transactional stuff stored in them. There will be many records per user_id in each table. Table1 and Table2 have a one-to-one relationship with each other. I want to pull records from both tables, but I want to exclude records which have certain values in both tables. I don't care if they both don't have...

does php mysql_fetch_array works with html input box?

this is my entire PHP code: <?php if(empty($_POST['selid'])) {echo "no value selected"; } else { $con = mysql_connect("localhost","root",""); if(mysql_select_db("cdcol", $con)) { $sql= "SELECT * FROM products where Id = '$_POST[selid]'"; ...

Concate String In MYSQL

How can i concate this string in mysql desc=desc+$desct what i want is each time i insert a variable from PHP that the string is added to the string which was already in db and seperated with || the field desc should look like this desc 10||30||90||710 say i want to add the value 20 desc 10||30||90||710||20 then the desc fiel...

Studying MySQL, SQLite source code to learn about RDBMS implementation

I know implementing database is a huge topic, but I want to have a basic understanding of how database systems work (e.g. memory management, binary tree, transaction, sql parsing, multi-threading, partitions, etc) by investigating the source code of the database. Since there are a few already proven very robust open source databases li...

What is the difference between a socket and a port connection in MySQL?

Hi guys, when I am using 'localhost' as the host for MySQL database, sequel pro alert me that I will be using socket. On the other hand, if I use '127.0.0.1', i would be using the ip address and port 3306 to reach the server. What is the difference? ...