Programming :: Redesign Existing Mysql Db In Php?

Apr 13, 2011

i inherited 200 tables in a mysql db from each of the 200 table there are table created on php pages

the information is organized pretty much the same (fields) in each of them, so i dont see the point of having so many different tables

i wanna redesign the db, in 4 tables each of this 200 table have a few essential characteristics, like: table name is (version_country_type), ie: v8_de_pro, v8_de_std, v9_uk_pro the fields are: No, Document_file, Document_path, ISBN, Book_Name, Subtitle, Status, Year_issue, Author

i will need to break the table name, and put each part in the new redesigned 4 tables separate fields...
ill have something like:

id, version, country, type, Document_file, Document_path, ISBN, Book_Name, Subtitle, Status, Year_issue, Author

but i have no idea how to do it i know i cant do it in mysql... so ill need to build up a php script which will need to read every table, and drop it in the new format:

table1 called Main: ID, version
table2 called Cat: ID, IDmain, Country
table3 called Sub: ID, IDmain, IDcat, type
table4 called files: ID, IDmain, IDcat, IDsub, Document_file, Document_path, ISBN, Book_Name, Subtitle, Status, Year_issue, Author

View 14 Replies


ADVERTISEMENT

CentOS 5 :: Upgrade Existing MySQL 5.0.77 Version On CentOS 5 Red Hat To MySQL 5.1.x

Aug 31, 2010

I want to upgrade existing MySQL 5.0.77 version on CentOS 5 Red Hat Linux to MySQL 5.1.x. Is anybody have list of patches or upgrades to upgrade to MySQL 5.1.x?

View 6 Replies View Related

Ubuntu :: Existing MySQL Embedding To FTP

Jan 27, 2010

I have question about embedding existing mysql data to FTP. Let me tell you how the system works. Apache gets the user name and passwords records to the MYSQL and creates a folder per user in server. However users can not access their created folder using FTP client software. So how am I gonna merge the existing user/password data in MYSQL ---> to the FTP user/password. Vsftpd and proftpd installed already, so in whichever you feel more knowledgeable, I can go with that.

View 5 Replies View Related

Fedora :: Transfer The Database Without Upgrading The Existing Mysql In Solaris Machine?

Oct 14, 2010

i am using fedora 12i want to bakup my mysql database and extract it in my solaris 10 machine.in my fedora machine i gave

mysqldump (database-name) > bakup.sql
in my solaris machine i gave
mysql (newly created dbname) < bakup.sql

[code]....

View 4 Replies View Related

Ubuntu Installation :: Upgrade Apache/SSL/Mysql/PHP And Mimic Existing Packages?

Aug 6, 2011

The Payment Card Institute (PCI) is requiring our site to upgrade to the latest versions of Apache, Mysql, OpenSSL, and PHP to fix known bugs that can compromise securityI can build all these from source, but when I do "make install" they don't mimic at all what is installed (directory format, files, etc) when I do apt-get install (of whatever old versions are in the dist).How can I find out how the packages are build via configure/make so that I can replicate the files, directory structure, etc, just with the current versions.

View 9 Replies View Related

Programming :: Error ""Can't Connect To Local MySQL Server Through Socket" In Connecting To MySQL In C Language

Sep 29, 2010

I wrote a code in C to connect to MySQL by using mysql_real_connect function but I recieved error "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" (by using mysql_error function).

I also did the following things: in mysql I typed 'SHOW VARIABLES LIKE '%SOCKET%'', it returned /var/lib/mysql/mysql.sock I typed 'mysql_config --socket' in shell, it returned /var/lib/mysql/mysql.sock I modified /etc/my.cnf file

View 3 Replies View Related

Debian Programming :: Add Entries To Existing Menu

Jan 12, 2014

What I would like to do is, with a right click, have the menu give me the option to run srm, which is a "secure remove" program. I picked this one as it requires not only a file name, but some other options. I've run into no support adding things to menus. When I updated one of the Debian versions, I lost the shutdown option from the name menu that used to be there. It was suggested that I right click and pick that option to restore it, but I get the same as the left button on that menu.

View 2 Replies View Related

Programming :: Write Own Telnet Server Instead Of Existing One?

Jun 29, 2010

how i will write my own telnet server instead of existing one.please give me the path for telnet.c file in the linux kernel

View 9 Replies View Related

Programming :: Adding New Selections To The Existing Script?

Mar 19, 2010

i have two scripts called:

"type" & "selecttype".

In "type" i have only the name of the products ex.: product1 & product2. Now, i have to ADD product3 which includes sub categories: productA, productB, productC, productD, productE, productF. so my New type script (menu) looks as below:

1) product1
2) product2
3) product3

and my current selectype looks how can I add the new product3 argument with all other multiple selections (productA, productB, productC, productD, productE, productF) into my current selectype (as below which is set only for product1 & product2), so when a user select: 3) product3 from "type" would get a new menu of all the sub categories, and the script would process the new additional arguments.

Here is the copy of my selectype script:

#!/bin/sh
echo SELECTTYPE
export -n selecttypechoice
if [ "${upgrade}" == "yes" ] ; then

[code]....

View 5 Replies View Related

Programming :: Making Existing MS Excel App Web Based

Jun 7, 2010

I have a LAMP based web hosting account (BlueHost). I have an existing simple MS Excel application which I would like to make it web based. However I am not sure what tools or features of PHP are out there that will aid me with this task. Here are some details:

1. I don't want to create an entire Excel program online. For that there are plenty of existing applications like Google Docs, MS's own online version of Excel, etc.
2. My current excel file uses some of the following excel functions:
a) SUM
b) Product Sum
c) Conditional Formatting (like changing font color if an amount is below a threshold, etc.)
d) Sorting (Date, Amount)
e) Drop Down Box to select pre-defined values

3. Ability to add/delete/modify a entry (row)
4. I don't care whether the application has the same look-n-feel as MS Excel.

As you can see it is a very simple home grown excel application with few basic mathematical functions. Here are some few thoughts that I have currently in my mind:

i) Just start coding intuitively as you would develop a normal web based application.
ii) Do (i) but use some of the PHP's excel oriented helper functions (COMs?) if there are any
iii) Use completely a different set of tools permitting that they run on LAMP environment.

I could have started with (i) but before making a costly mistake I thought I would get some opinion from the community to see if this is the right approach.

View 1 Replies View Related

Programming :: Running Command In Existing Terminal?

Aug 17, 2010

Here's my linuxquestion I have a bash terminal window opened by next command:

Quote:

gnome-terminal -x bash -c "bash"

Now i need to run different commands or scripts AS ROOT in this terminal window from another terminal. I tried things like

Quote:

sudo echo 123 >/dev/pts/4

The result is 123 in that terminal window, but sudo password is asked in my tab where i entered the command.

View 6 Replies View Related

Programming :: Pass Variable In Mysql Qyery In C Programming?

Dec 4, 2010

i want to pass variable in mysql qyery in c programming

View 1 Replies View Related

Debian Programming :: Editing Postinst In Existing Binary Packages

Oct 30, 2014

I have lately found myself setting up a number of PXE installation servers sufficient that I'm now inspired to automate the process. I've not done this before, but I think I've hit on a method to make it work. I'm using three packages from the archive as a basis: tptpd-hpa, isc-dhcp-server, and nfs-kernel-server. Up to now I've been installing these with APT, then modifying their configs (or creating same as necessary) and then copying my install files (pxelinux.0 and friends, with Debian Wheezy netinst and Xubuntu 14.04 menu options) into /srv/tftp. It strikes me that, rather than letting these packages' postinst scripts do a bunch of stuff that I will subsequently undo, I should modify the scripts in situ to do what I want. I don't feel that I adequately understand how these things work, so I'm asking for advice.
So far I've hit upon two different methods.

I can use apt-get download to fetch the packages, and then dpkg-deb --control to pull out the control files. Then I can edit the postinst scripts as necessary and dpkg-deb --build a new package from the results of dpkg-deb --fsys-tarfile plus the altered postinst scripts. I have gotten as far as extracting the control files from a package, but I'm unsure that the dpkg-deb --build step will work as I expect. Alternately I can do apt-get source [packages], edit the postinst scripts in the source, and then build the packages as usual. I'm more confident that this will work, but I'd rather provide the former method if possible. Is there another method of which I've not thought? Is this the way metapackages are made and configured?

View 2 Replies View Related

Programming :: How To Write Using Fwrite Without Affecting Existing Content Of File?

Oct 30, 2010

How can I write to a file multiple times using fwrite without affecting the previous writes?The method shown below accepts a file name, buffer and offset. The method opens the file in reading/writing mode and writes the content of the buffer at offset.

View 1 Replies View Related

Programming :: Selecting VGA Planes Causes Existing Pixels To Change Colors?

Oct 28, 2009

using the code

Code:

void setplane(unsigned char mask){
inportb(0x3DA); //Reset the VGA flip/flop
unsigned char c=inportb(0x3C0); /*the VGA does not like you not saving values*/

[code]....

does not work, for example if setplane(1); will change all pixels plotted to blue - not just the newest. and here is how i plot pixels:

Code:

void ppixel(unsigned x, unsigned y, unsigned char color){
setplane(color);
((char far *)0xA0000000L)[(y*(640/8))+(x/8)]=((1<<7)>>(x%8));
}

View 2 Replies View Related

Server :: Add Existing Unix User To Existing LDAP?

Jun 23, 2010

I have an existing unix user that some how didnt make it into the copy over to our LDAP server. How do I add an existing unix user to an existing LDAP directory? Will ldapadd work? I was under the impression ldapadd required an ldif file to work properly.

View 7 Replies View Related

Programming :: Updating A Text File (replacing The Existing Parameters With The New Values)

Nov 9, 2010

I have a text file that needs to be updated to be used by some fortran code later. it looks like that:

1,1 !Ms for y-stations, Ns for x-stations
0,0,0, !xsta, ysta, zsta

I need to replace the "0,0,0" with new values for xsta,ysta and zsta;

View 4 Replies View Related

OpenSUSE Network :: ERROR 2002 (HY000): Can't Connect To Local MySQL Server Through Socket '/var/mysql/mysql.sock

Jun 7, 2011

I think this goes here, but I'm not sure. I decided that XAMPP had been troublesome enough. MySQL never worked. So I decided to instal the LAMP stack offered by YaST. I went about installing it thinking that it would all work. But it seems that I was wrong. So I try to start mysql, and here's what I get:

Code:
the-matrix:~ # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) or
Code:
the-matrix:~ # rcmysql start
Starting service MySQL warning: /var/mysql/mysql.sock didn't appear within 30 seconds
chmod: cannot access `/var/run/mysql/mysqld.pid': No such file or directory

[Code]...

View 6 Replies View Related

General :: Can't Connect To Local MySQL Server Through Socket '/var/lib/mysql/mysql.sock' (2)

Jun 2, 2010

i am using liferay5.2(mysql included in the download pack) on fedora. while liferay is working fine but i cannot connect to mysql.i am getting the error

[
[root@localhost ~]# ln -s /var/lib/mysql/mysql.sock /tmp
[root@localhost ~]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.

[code]....

i didnt find the mysql.sock file in the location /var/lib/mysql/mysql.sock. i cannot find the portal-ext.properties file also to make intial settings.

View 9 Replies View Related

Programming :: Can't Install The DBD:mysql

Jan 22, 2011

May you please some one tel me why I cant install DBD::mysql?I reinstall perl and DBI several times

Perl V5.12 / OS:REDHat Enterprise 5.5

Code:

[root@testsrv5 sh]# cd DBD-mysql-4.018
[root@testsrv5 DBD-mysql-4.018]# ls
ChangeLog dbdimp.h lib MANIFEST myld t
constants.h eg Makefile.PL MANIFEST.SKIP mysql.xs TODO

[code]....

View 4 Replies View Related

Programming :: MYSQL Driver Is Not Loaded

Dec 25, 2010

I also the same problem, just that I can not proceed in the same way because I use Ubunto, what should I do to install the MySQL driver on my PC?

View 1 Replies View Related

Programming :: PHP And MySQL - Dynamic URL Generation

Jul 18, 2011

I have recently started PHP and mysql and so far I am loving it. I have read that the best way to learn any scripting/programming language is to read others code and get involve in a project. I am planning to develop a ticketing system for my intranet environment, meaning it will only be available to certain specific personnel to generate tickets, just like a helpdesk system. So a thought came in my mind, that, if a ticket is generated, a email should be sent to the relevant personnel pointing to that ticket. Now what I mean by this is, like if I have posted a query on LQ.org, a email notification is sent with a dynamic url pointing to my post if someone answers it. How its done? I mean is it done by PHP engine or apache?

View 2 Replies View Related

Programming :: Mysql Compare Two Rows

Aug 21, 2010

I would like to compare to mysql rows as follows:

Select count(*) from stocks2.historical where close*1.05 < (select open from stocks2.historical where date = date_add(date,interval 1 day))
and year(date)=2010;

The problem is with the "date" in bold... i want that date to be the date of the previous row. is there a way to do that purely with mysql? (naturally, i can write a script to go through and compare each date; what i'm asking for is a mysql solution.)

View 3 Replies View Related

Programming :: MySQL Unsigned Character?

Jan 8, 2010

I am trying to create a table T having a field F which should be able to store variable-length sequences of "unsigned" characters (8bit values ranging from 0 to 255 (not including 0, including 255)).(MAX_LENGTH) is not working, as it seems to want sequences of 8bit values ranging from 0 to 127 (thus "signed" characters).Can anyone help me by pointing out if there is a type suited for my needs (or if such a type does not exist)?For those familiar to C programming and working with the MySQL client library, I should be able to (successfully) do something along the lines of:

Code:
unsigned char value[] = { 'H', 'E', 'L', 'L', 'O', -1, -128, 'W', 'O', 'R', 'L', 'D' };
unsigned char query[255];

[code]....

View 3 Replies View Related

Programming :: Perl And Mysql - Warnings?

Dec 2, 2010

I've decided to learn perl and have an application that is going to require the use of mysql.

Are these warnings bad?

Here's the code:

Code:

And the warnings:

Code:

View 2 Replies View Related

Programming :: PHP & MySQL - Query A Database From The Web?

Apr 26, 2010

I have created a database which stores students grades for different stages of a project. One of the stages of the project is the specification part. I have a simple bit of html code which is going to be used as the searching facility. I want the user to be able to enter their ID and then it will display only their results. At the moment, it is displaying the results for EVERY student because I cant seem to find the correct syntax for my statement.

Heres the HTML code

<html>
<head>
</head>
<body>
<body bgcolor="#6881bb">
<center>

[Code]....

At the moment when i click the button, no matter what I enter every students marks appear on the screen.

I think, but obviously dont know for sure because if i did i would know how to solve the problem, the code that i need to change is in green.

View 3 Replies View Related

Programming :: PHP Ignores One MySQL Table But Not Others?

Sep 23, 2010

I have just run into a baffling error. I have a database set up in MySQL with six tables. My PHP based website performs queries of all kinds on these tables (SELECT, INSERT, UPDATE, DELETE). On my most recently setup table, the "Orders" table, I am able to perform queries from the server, as well as from my PHP MySQL Admin interface, but all activity from my webpage states that the Orders table does not exist. All other tables are running fine. I have tried rewriting the query script, checked for case sensitivity problems, even cut and pasted other working scripts in place, changing the table and field names as needed. No success. What could cause a single table to not show up like this?

View 2 Replies View Related

Programming :: Insert Query In Mysql ?

Jul 12, 2011

When i enter this query to mysql:

Code:

return this error:

Code:

when i delete the insert part :

Code:

query is ok:

Code:

1 row in set (0.00 sec)

View 2 Replies View Related

Programming :: Unable To Delete A Table In MySQL?

Oct 17, 2010

A sed mishap prior to a database import left me with a table name with, eh, well, this: Code: mysql> show tables;

+-------------------+
| Tables_in_someday |
+-------------------+
| day20101016 |
| day20101017); |
+-------------------+

I've corrected the sed mishap and imported the database the way it was intended Code: mysql> show tables;

+-------------------+
| Tables_in_someday |
+-------------------+
| day20101016 |
| day20101017); |
| day20101017 |
+-------------------+

But I can't seem to drop the table day20101017); because no matter how I seem to escape it it errors.

View 1 Replies View Related

Programming :: Write A Program That Interacts With MySql In C

Mar 28, 2011

Im trying to write a program that interacts with MySql in C . Im using slackware 13.1 64 bit and Ive installed MySql , getting help from this page : [URL] .

This is the program I have ( I know they arent any vars here , i just thought it wasnt necessary )

Code:
#include <stdio.h>
#include <mysql/my_global.h>
#include <mysql/my_sys.h>
#include <mysql/mysql.h>

[Code]....

This program is from the MySql website ( a tutorial they have up there ). When I run this program I get hundreds of lines of errors , nothing related to my program , but the headers, indicating that there are syntax errors and all kinds of other problems in them.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved