Search found 25 matches

by Pritesh23
Mon Oct 28, 2013 5:37 am
Forum: Free time
Topic: Shell Script Help
Replies: 1
Views: 1251

Re: Shell Script Help

I need something like this. :? This is just REFERENCE. It is not working. :(

Code: Select all

#!/bin/sh
DB_USER="****"
DB_PASS="****"
DB_NAME="****"
echo
date
cd customer
for i in *-*.php
do 
  echo $i
  php $i $1
  echo
  date
:help:

THANKS IN ADV.
by Pritesh23
Sat Oct 26, 2013 2:09 pm
Forum: Free time
Topic: Shell Script Help
Replies: 1
Views: 1251

Shell Script Help

Hello, I have one tar.Z file. I have to run shell script daily as it is required to update the database. :help: customer_yyyymmdd_hhmi.tar.Z sales_ yyyymmdd_hhmi.csv (5 MB - 20 MB) purchase_ yyyymmdd_hhmi.xml (650 MB - 950 MB) I have made small part of XML file. There are 4 parts. There is PHP Scrip...
by Pritesh23
Tue Sep 10, 2013 7:10 am
Forum: PHP coding => General
Topic: Validate Form and Filename PHP
Replies: 0
Views: 733

Validate Form and Filename PHP

Hello, I would like to solve form validation and filename problem. Here is my code: /************************** Step 1: Select Cell************************************/ if(isset($_POST['SmartPhone'])) $checked1=$_POST['SmartPhone']; $form->add_checkbox('SmartPhone','SmartPhone',$checked1); if(isset(...
by Pritesh23
Tue Sep 10, 2013 7:04 am
Forum: mySQL & php coding
Topic: DELETE Query MySQL
Replies: 5
Views: 2804

Re: DELETE Query MySQL

Finally, it works..!!! :D Thank you all for your input. DELETE vtest FROM vtest JOIN ( SELECT nidt, noeud, MAX(version) as maxversion FROM version GROUP BY nidt, noeud ) latest USING (nidt, noeud) LEFT JOIN ( SELECT nidt, noeud, MAX(version) as maxoper, 1 AS isoper FROM version WHERE etat_fonct = 'O...
by Pritesh23
Fri Sep 06, 2013 9:24 am
Forum: mySQL & php coding
Topic: DELETE Query MySQL
Replies: 5
Views: 2804

Re: DELETE Query MySQL

Well it is not expected at all :( CREATE TABLE IF NOT EXISTS `version` ( `id` int(11) NOT NULL auto_increment, `nidt` varchar(11) NOT NULL, `noeud` tinyint(3) NOT NULL, `VERSION` float NOT NULL, `ETAT_FONCT` varchar(20) default NULL, `idnap` varchar(25) NOT NULL, `nidtint` bigint(20) NOT NULL, PRIMA...
by Pritesh23
Fri Sep 06, 2013 7:12 am
Forum: mySQL & php coding
Topic: DELETE Query MySQL
Replies: 5
Views: 2804

Re: DELETE Query MySQL

To make it easy to understand:

for each distinct nidt,noeud pair
if there is an operational version then
delete all non-operational versions
and all older operational versions
else
delete all older versions[/color]

I hope it will work. :help:

Thanks.
by Pritesh23
Fri Sep 06, 2013 12:10 am
Forum: mySQL & php coding
Topic: DELETE Query MySQL
Replies: 5
Views: 2804

Re: DELETE Query MySQL

It seems good. Thanks for quick reply. :)
But if i do so it will DELETE bad rows. :(
Please look at EXPECTED result one more time.

Yes, i took BACKUP and run Your query . It gives error:

#1093 - You can't specify target table 'version' for update in FROM clause
by Pritesh23
Thu Sep 05, 2013 8:49 am
Forum: PHP General
Topic: Feedback System PHP/MySQL
Replies: 8
Views: 2134

Re: Feedback System PHP/MySQL

It seems good but i believe the databse design is almost based on the link that you gave.

Any example would be great for Question 2.

:help:
by Pritesh23
Thu Sep 05, 2013 8:43 am
Forum: mySQL & php coding
Topic: DELETE Query MySQL
Replies: 5
Views: 2804

DELETE Query MySQL

I need to delete the rows. I need urgent help..!! :help: Please look at the table data carefully. PFA...!! Table: CREATE TABLE IF NOT EXISTS `version` ( `nidt` varchar(11) NOT NULL, `noeud` tinyint(3) NOT NULL, `VERSION` float NOT NULL, `ETAT_FONCT` varchar(20) default NULL, `idnap` varchar(25) NOT ...
by Pritesh23
Tue Aug 27, 2013 12:39 pm
Forum: PHP General
Topic: Feedback System PHP/MySQL
Replies: 8
Views: 2134

Re: Feedback System PHP/MySQL

I cannot do the database design for you unless you are willing to pay me.
Thanks for your input but i am not asking for total design DB / module. :)

I just would like to get ruff idea and best possible options before starting my work. :D
by Pritesh23
Sun Aug 25, 2013 11:48 pm
Forum: PHP General
Topic: Feedback System PHP/MySQL
Replies: 8
Views: 2134

Re: Feedback System PHP/MySQL

Just go ahead and design the application. For DB: One possible solution can be like this: Tool[tool_id(PK),tool_name,description(if required)] User[user_id(PK),user_name,email_id,display_name(if registered user)] Question[question_id(PK),question] feedback[feedback_id,user_id,tool_id,question_id,co...
by Pritesh23
Sun Aug 25, 2013 6:47 am
Forum: PHP General
Topic: Feedback System PHP/MySQL
Replies: 8
Views: 2134

Feedback System PHP/MySQL

I need to develop Feedback module in PHP/MySQL. I would like to know the database design and flow to manage this system. There are questions for 2 tools which i need to store in my databse and need to create report like %of Positive Response, % of Negative Response, No. of Users for Tool1/2 etc. I w...
by Pritesh23
Mon Aug 19, 2013 6:21 am
Forum: PHP General
Topic: XML Read by XPath DOM
Replies: 14
Views: 3181

Re: XML Read by XPath DOM

Finally, its SOLVED.....!!!! :D

Code: Select all

UPDATE machines LEFT JOIN machines_type ON 
machines.Reference = machines_type.Reference 
SET machines.Type = machines_type.Type
WHERE
machines_type.Reference IS NOT NULL
:offtopic:
by Pritesh23
Mon Aug 19, 2013 1:41 am
Forum: PHP General
Topic: XML Read by XPath DOM
Replies: 14
Views: 3181

Re: XML Read by XPath DOM

I created "machines_type" table to store all Type Values. The main table is "machines". I need to solve Update Query with LEFT JOIN :help: UPDATE machines SET machines.Type = machines_type.Type WHERE Reference IN (SELECT machines.Reference, machines_type.Reference FROM machines LEFT JOIN machines_ty...
by Pritesh23
Fri Aug 16, 2013 1:54 am
Forum: PHP General
Topic: XML Read by XPath DOM
Replies: 14
Views: 3181

Re: XML Read by XPath DOM

I did. It is not inserting in table and it should insert TWO rows as TWO Type are matching. :) XML <?xml version="1.0" encoding="utf-8"?> <Physical> <Catalog> <EquipmentSpec> <Reference>MAT_48985</Reference> <Type>Duplexeur</Type> <Characteristic><CharacteristicName>Tilt</CharacteristicName> <Charac...
by Pritesh23
Wed Aug 14, 2013 7:29 am
Forum: PHP General
Topic: XML Read by XPath DOM
Replies: 14
Views: 3181

Re: XML Read by XPath DOM

Can you tell me OUTPUT for this xml file ?? <?xml version="1.0" encoding="utf-8"?> <Physical> <Catalog> <EquipmentSpec> <Reference>MAT_478788</Reference> <Type>Duplexeur</Type> <Characteristic><CharacteristicName>Tilt</CharacteristicName> <CharacteristicValue>0</CharacteristicValue></Characteristic>...
by Pritesh23
Wed Aug 14, 2013 6:14 am
Forum: PHP General
Topic: XML Read by XPath DOM
Replies: 14
Views: 3181

Re: XML Read by XPath DOM

Thanks. :) But It is giving result: :?

Code: Select all

<br/><br/><br/><br/>
I think We need to correct this:

Code: Select all

echo "<br/> Type = ".$element->nodeValue."\n";
:help:
by Pritesh23
Wed Aug 14, 2013 2:28 am
Forum: PHP General
Topic: XML Read by XPath DOM
Replies: 14
Views: 3181

Re: XML Read by XPath DOM

Well, I have 850 Mb XML file and i just would like to present small part of it once again: <?xml version="1.0" encoding="utf-8"?> <Physical> <Catalog> <EquipmentSpec> <Reference>MAT_4</Reference> <Type>Duplexeur</Type> <Characteristic><CharacteristicName>Tilt</CharacteristicName> <CharacteristicValu...
by Pritesh23
Tue Aug 13, 2013 2:55 am
Forum: PHP General
Topic: XML Read by XPath DOM
Replies: 14
Views: 3181

Re: XML Read by XPath DOM

Well, i have already seen this article. Thanks.
by Pritesh23
Tue Aug 13, 2013 2:08 am
Forum: PHP General
Topic: XML Read by XPath DOM
Replies: 14
Views: 3181

XML Read by XPath DOM

I would like to get Type, Id and Height values in database table. It is not working. There is no error message. :help: XML File: <?xml version="1.0" encoding="utf-8"?> <Physical> <Catalog> <EquipmentSpec> <Reference>030_17</Reference> <Type>Duplexeur</Type> <Characteristic><CharacteristicName>Tilt</...
by Pritesh23
Tue Jul 30, 2013 7:43 am
Forum: PHP General
Topic: How to develop interface between xml and mdb files
Replies: 2
Views: 1120

Re: How to develop interface between xml and mdb files

I have 50 Mb MDB file and 20 Mb XML file. I just need to know functional flow and tools/technical issues. :help:

I hope i am clear to you. :)
by Pritesh23
Tue Jul 30, 2013 4:34 am
Forum: PHP General
Topic: How to develop interface between xml and mdb files
Replies: 2
Views: 1120

How to develop interface between xml and mdb files

Hello,

I would like to know how i can develop interface between XML and MDB files? :?

Actually, i need to convert files from XML into MDB and vice versa. Approximately, how much time it will take? :help:

Thanks in advanced for your input.
by Pritesh23
Thu Jul 18, 2013 2:58 am
Forum: PHP General
Topic: Read ALL data with XPath/XML/PHP from XML
Replies: 3
Views: 1093

Re: Read ALL data with XPath/XML/PHP from XML

THANKS A LOT. :D foreach ($xml->xpath('//Equipment') as $eq) { $Id = $eq->Id; $Reference = $eq->Reference; $Site = $eq->Site; $Cellule = $eq->Cellule; foreach ($eq->Characteristic as $c) { if ($c->CharacteristicName == 'Usage') { $Usage = $c->CharacteristicValue; } SOLVED
by Pritesh23
Thu Jul 18, 2013 12:01 am
Forum: PHP General
Topic: Read ALL data with XPath/XML/PHP from XML
Replies: 3
Views: 1093

Re: Read ALL data with XPath/XML/PHP from XML

@johnj:
try this code:
First of all thanks for your time.

I tried your code. It is not working. :help:

Any other idea??
by Pritesh23
Wed Jul 17, 2013 12:51 pm
Forum: PHP General
Topic: Read ALL data with XPath/XML/PHP from XML
Replies: 3
Views: 1093

Read ALL data with XPath/XML/PHP from XML

Hello All, I would like to get all Equipment values. I have used DOM Document. It is reading ONLY LAST Element. Equipment Id: 28. I need all three. Thanks in advanced. XML File: <?xml version="1.0" encoding="UTF-8"?> -<Physical> <Catalog> </Catalog> -<Installed> -<Equipment> <Id>26</Id> <Ref>Tew12</...