Ask a Question related to PHP Development, Design and Development.
-
Inder #1
Design problem
Hi All,
This could be a classic design problem, but as I am using PHP, I
thought I would seek help in this NG.
I have built a small application in PHP/MySQL which can store
some product information in a database and at a later stage, one can
search and generate the stored data in XML format, to be uploaded to a
remote server.Each product has a set of features.Now the problem is
that the features of any of the products change too often according to
the market conditions etc.Modifying any feature requires me to make
changes in GUI, the SQL queries in the store/generate pages, in the
database and also in the XSL used to display the generated XML.All
this has become too cumbersome and I am thinking of rewriting the
whole thing in a more logical way.
I was thinking of representing a Product with a class, each feature
being its fields and corresponding get/set methods. But Im not sure
whether even this would help me in avoiding changing SQL queries/XSL
etc. for each changes in the class fields.
I would appreciate any information in this regard.
Thanks
Inder
Inder Guest
-
db query/design problem
Hello I have a question about my database design, and how to query. I Made an extra table in my database design in where I put the type of... -
Design view problem
Hi there, I can't understand why when I write this text (part of datalist) onclick="javascript: changeImage('<%#... -
Design Problem!!
Hello, I have Windows Forms application which uses MS Access Database and a Pocket PC application which uses Datasets, Iam trying to pass... -
Design-time problem
Hi there, I have 2 properties "P1" (enum) and "P2" (Color). When I set P1 I change the value of P2. Although the value of P2 is changed in... -
Database Design Problem
I've got a problem I need to solve where I have an item that can have one or more prices, but the item can be bought from one or more distributors... -
rush #2
Re: Design problem
"Inder" <inder1978@hotmail.com> wrote in message
news:e79bfa2c.0309170124.19dacc70@posting.google.c om...maybe you could your product contain a set of features, where each feature> Hi All,
> I have built a small application in PHP/MySQL which can store
> some product information in a database and at a later stage, one can
> search and generate the stored data in XML format, to be uploaded to a
> remote server.Each product has a set of features.Now the problem is
> that the features of any of the products change too often according to
> the market conditions etc.Modifying any feature requires me to make
> changes in GUI, the SQL queries in the store/generate pages, in the
> database and also in the XSL used to display the generated XML.All
> this has become too cumbersome and I am thinking of rewriting the
> whole thing in a more logical way.
is represented with object (and row in features table). You would have a few
types of features, (number, text, image, longer text).
rush
--
[url]http://www.templatetamer.com/[/url]
rush Guest
-
sotto #3
Re: Design problem
On Wed, 17 Sep 2003 02:24:10 -0700, Inder wrote:
> Hi All,
> This could be a classic design problem, but as I am using PHP, I
> thought I would seek help in this NG.
> I have built a small application in PHP/MySQL which can store
> some product information in a database and at a later stage, one can
> search and generate the stored data in XML format, to be uploaded to a
> remote server.Each product has a set of features.Now the problem is that
> the features of any of the products change too often according to the
> market conditions etc.Modifying any feature requires me to make changes in
> GUI, the SQL queries in the store/generate pages, in the database and also
> in the XSL used to display the generated XML.All this has become too
> cumbersome and I am thinking of rewriting the whole thing in a more
> logical way.
> I was thinking of representing a Product with a class, each feature
> being its fields and corresponding get/set methods. But Im not sure
> whether even this would help me in avoiding changing SQL queries/XSL etc.
> for each changes in the class fields.
> I would appreciate any information in this regard.
>
> Thanks
>
> Inder
Haven't used it myself yet, but have been told it's something very
practical: PEAR DB_DataObject ([url]http://pear.php.net[/url])
(you build your database-class-objects, and the pear-thing builds the sql
for you.)
grtz, sotto
sotto Guest
-
JRB #4
Design Problem
Hi, I'm a programmer, but new to ASP.NET. I'm playing around with the
Repeater and DataGrid controls. Here's the situation. I've got a MySQL
database containing a couple tables. One called "games", one called "picks".
picks has fields "GameID", and "PickedTeam". games has fields "GameID",
"HomeTeam", and "AwayTeam". I what to be able to display all the data in the
games database in a table on a webpage with the user being able to select who
he or she thinks will win that game. I want to use radio buttons so the user
can only choose one team per row. Then when the user has choosen a winner for
each game (or row) he or she clicks the "Sumbit" button. What needs to happen
now is that for each row, an entry is entered into the picks table. The
GameID and PickedTeam are entered. I'm not going to worry about any of the
validation yet until I have this working. The idea I have in my head is to
have a RadioButtonList for each row. The ID will be the GameID field pulled
from the database. Each RadioButton in the list's name will just be the name
of the team pulled from the database. Then when one team is choosen from each
row, what can be entered in the picks database is a bunch of rows based on
the name of the RadioButtonList and the value choosen in that List. This is
probably not a difficult problem for someone who really knows the controls
well and knows how to use them. Any feedback is really appreciated. Thanks!
JRB Guest
-
Jeff Bowman #5
Re: Design Problem
Here, give this a read for your RadioButtonList TemplateColumns:
[url]http://aspnet.4guysfromrolla.com/articles/061002-1.aspx[/url]
Then, in the Click event of your submit button, you can iterate through your
DataGrid's Items collection. Each item (row) has a Cells collection, and each of
those in turn has a Controls collection.
Find out the index of your RadioButtonList in that Controls collection, and the
rest should be easy.
' Careful, not tested -- written from memory only
For Each loItem As DataGridItem In grdDataGrid.Items
For Each loCell As TableCell In loItem
For liIndex As Integer = 0 To loCell.Controls.Count - 1
If TypeOf loCell.Controls(liIndex) Is RadioButtonList Then
Response.Write(liIndex)
End For
End For
End For
HTH,
Jeff
JRB wrote:> Hi, I'm a programmer, but new to ASP.NET. I'm playing around with the
> Repeater and DataGrid controls. Here's the situation. I've got a MySQL
> database containing a couple tables. One called "games", one called "picks".
> picks has fields "GameID", and "PickedTeam". games has fields "GameID",
> "HomeTeam", and "AwayTeam". I what to be able to display all the data in the
> games database in a table on a webpage with the user being able to select who
> he or she thinks will win that game. I want to use radio buttons so the user
> can only choose one team per row. Then when the user has choosen a winner for
> each game (or row) he or she clicks the "Sumbit" button. What needs to happen
> now is that for each row, an entry is entered into the picks table. The
> GameID and PickedTeam are entered. I'm not going to worry about any of the
> validation yet until I have this working. The idea I have in my head is to
> have a RadioButtonList for each row. The ID will be the GameID field pulled
> from the database. Each RadioButton in the list's name will just be the name
> of the team pulled from the database. Then when one team is choosen from each
> row, what can be entered in the picks database is a bunch of rows based on
> the name of the RadioButtonList and the value choosen in that List. This is
> probably not a difficult problem for someone who really knows the controls
> well and knows how to use them. Any feedback is really appreciated. Thanks!
Jeff Bowman Guest



Reply With Quote

