This topic is locked

First time use and possible a dumb question...

6/21/2006 8:31:40 AM
PHPRunner General questions
M
mike-pt author

Hi all.
I am fairly new to php and mysql and out of a desperate grasp into the search engines I found this program what looks to be absolutely amazing. No more (hello world)!
Using it for the first time to build a database I seem to have hit a brick wall.
I have created two tables in my database that are linked by "id". I can create pages where I am able to view the content of one table or the other. However I can't fathom out how to create a page that displays all the data on one page from both of the tables!
I believe this should be possible but can't see how it's done.
Can anyone advise please?
Thanks

Mike

J
Jane 6/21/2006

Mike,
to join info from two tables edit SQL query manually on the Edit SQL query tab (step 4) in the PHPRunner.

Here is an example:

select table1.field1,

table1.field2,

table2.filed3

from table1 inner join table2

on (table1.field1=table2.field3)



Read more info here:

using_join_sql_queries

M
mike-pt author 6/21/2006

WOW... I tried that and got errors!
May be its easier to just have one big table in my database.

This will do what I want but I expect its not the best way to go?
I just thought there would be a simple way.
Thanks for your help.
Mike

B
bmak 6/21/2006

Hi Mike-pt,
Perhaps it would be easier if you posted your table design with the PK and FK links, that way we could see why they might not be working as you expected.
Incidentally, I have come to realise that NO question is 'dumb'. You will loose nothing if you ask the question and others can judge the community by the maturity of their answers.
Regards
bmak

M
mike-pt author 6/21/2006

OK Thanks.
I have two tables in my database, I have more fields to add later:
_Users

_Levels
The SQL query for _Users is:

select `userid`,

`prefix`,

`firstname`,

`surname`,

`suffix`,

`address`,

`city`,

`state`,

`postcode`,

`county`,

`email`,

`home_phone`,

`mobile_phone`,

`work_phone`,

`web_site`,

`access_level`,

`password`

From `_Users`
And for _Levels is:
select `userid`,

`a_date`,

`a_teacher`

`b_date`,

`b_teacher`

`c_date`,

`c_teacher`

`d_date`,

`d_teacher`

From `_Levels`
Is this what need?
Thanks
Mike

B
bmak 6/21/2006

Hiya,
Yep. Are any of them populated at the moment?
bmak

M
mike-pt author 6/21/2006

Yes but only sample data that I am playing with.

J
Jane 6/22/2006

Mike,
here is example of SQL query:

select `_Users`.`userid`,

`prefix`,

`firstname`,

`surname`,

`suffix`,

`address`,

`city`,

`state`,

`postcode`,

`county`,

`email`,

`home_phone`,

`mobile_phone`,

`work_phone`,

`web_site`,

`access_level`,

`password`,

`a_date`,

`a_teacher`

`b_date`,

`b_teacher`

`c_date`,

`c_teacher`

`d_date`,

`d_teacher`

From `_Users` inner join `_Levels`

on (`_Users`.`userid` = `_Levels`.`userid`)
M
mike-pt author 6/22/2006

Thank you.
That has worked out exactly how I wanted it to. Thanks again for that <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=9277&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
I have another question:
You asked me earlier if there were any data in the database, presumably because it is lost when the mod is applied.
Does this mean that once a database has been built, uploaded and put into use that we can then no longer modify the database without losing the data in the database?
Can it be backed up and restored?
Look forward to your reply.
Thank you.
Mike

B
bmak 6/22/2006

Hi Mike,
This is a bit of a 'yes' and 'no' answer.
I mentioned it earlier because you can run into problems with relationships if you have a populated database which then has design changes applied. You can alter your db design later so long as your new design does not clash with missing (or present) data from the database.
As to how you backup your database, that would verymuch depend on what type of database it is (MySQL etc) and how you access and modify it. If you use the PHPMyAdmin interface then you can always backup by dumping the database to a .sql file and storing this on a local machine somewhere.
Hope this helps.
bmak

M
mike-pt author 6/23/2006

Hi again.
I just noticed that I can no longer edit the fields on this new version of the users page. I think I read something about this somewhere. I think I have to make one more tweak to make this work, but I do not know where!
Can you help on this please?
Thank you.

B
bmak 6/23/2006

Hi again.

I just noticed that I can no longer edit the fields on this new version of the users page. I think I read something about this somewhere. I think I have to make one more tweak to make this work, but I do not know where!
Can you help on this please?
Thank you.


Hi Mike,
Sorry to hear you are having problems.
I have been using PHPrunner for about two weeks and would have to say that it is probably the best 'no coding necessary' solution for people wanting to create quick and easy PHP-based sites, however, having tried a good many of the other 'no PHP coding' solutions I have to say that it suffers from the same core problem. If you provide tools for non-programmers then the first thing these folks are going to want to do (once they get comfortable with how the application works) is to start thinking 'outside of the box' and as soon as they do this, the software get's out of it's depth. Most of these solutions are (as is PHPrunner) based around a 'one flavour fits all' template. Good as a starting point, not so good once you want to start modifying the remplate (because for this you need to know how to code in PHP - the very reason you bought the software in the first place).
Please don't get me wrong here, this is not intended as a criticism of the PHPrunner product - as I say, it is probably the best one I have tried to date and, more importantly, the developers are actively here on the support forms with us answering our questions - outstanding given the depth of lethargy shown by other 'no PHP coding' vendors. But there is only so much they can do to help as they must get a large number of help questions each day (just look at the number I have posted in my two week foray).
The best I can do is urge you to keep posting, there are people out there who can help you, I'm just sorry that, on this occasion, I am not one of them.
Good Luck
bmak

M
mike-pt author 6/23/2006

I agree with all you say.
I have to get this up and running so the fast way is to drop one of the tables and just use one table for all data.
Thanks again.
Mike

B
bmak 6/23/2006

I agree with all you say.

I have to get this up and running so the fast way is to drop one of the tables and just use one table for all data.
Thanks again.
Mike


Hi Mike,
For the sake of speed I think you may be right. A question if I may? Have you bought PHPrunner or are you still in trial mode?
I was thinking more about this non-programmer thing, what would work nicely and address many of the problems we see would be if there was a section called something like "If only I could do this", where common requests and solutions could be kept for newbie PHP programmers. The section could contain things like "I want to greet my visitor by name" and include how you would alter the code to get information from the visitor login. There would also be a section for proposing new articles.
I don't think any of us on this forum are particularly and we can almost always provide a pseudo-code of what we want, it's just getting hold of someone who knows how to transfer that into valid code blocks.
Regards
bmak

M
mike-pt author 6/23/2006

Well I am still using the trial mode. I want to build this database as far as I can before I commit $200 I will have to buy it to remove the advert banner from the database before my client uses it.
I want to make sure it can do all I need it to, it probably can if I can just figure it out. And yes what you propose sounds good.
Mike
PS is the trial mode any different from full in functionality ?

B
bmak 6/23/2006

PS is the trial mode any different from full in functionality ?


Hi Mike,
I don't think so, I am not aware of any banner yet as I have been using it purely for creating a members area with registration, login and reminders. I am also using it in Trial Mode as I was burnt badly recently while trying to use a competitor product, looked good sounded great but with absolutely dire support (and I use the phrase lightly).
I have been impressed with the desire of the support staff here (at PHPrunner.com) to be of assistance and help with custom code where necessary. Must admit that I have also been tempted to try ASPrunner as I can't tell what is more heavily used, PHP or ASP.
Kind Regards
bmak

G
giles 6/23/2006

Hi Mike,

Just noticed an issue you had with modifying the mysql database. There is a tool called dbtools - just google that name - that is excellent for modifying mysql and several other types of databases. You will be able to add and modify fields in your database without losing data if you use this tool appropriately. Little bit of a learing curve but it is not too steep. The tools has a 21 day eval period so you can see how it works before purchasing.
I did not find any difference between the eval version of phprunner and the purchased version. Except of course the "banner". Given how good phprunner is - you can do some very interesting things with a bit of template modification and code snippets - I would say go ahead and make the purchase. Apart from the fact that the developers need to make a living from this thing (and they provide excellent support) it would be bizzare of you to to waste time trying to remove the banner. You will end up with many pages in your project. Hand editing each page (and having to repeat the process each time you need to make a modification) will have you spending dozens and dozens of hours. And surely your time must be worth more than a few dollars per hour!! Better you do something more productive and get yourself a raise or other income source than muck around with that sort of non-productive stuff.
Also don't expect great help and support from the ..runner developers (and community) unless you are prepared to help them with what is a very modest financial contribution.
Have a good weekend.
Giles

M
mike-pt author 6/24/2006

Thanks Giles for the advice. I have no intention of trying to circumvent the limitations of the trial version. Why do you think this? Doesent matter!
I need to next modify the layout of the pages but this also is not to obvious. I simply want to change the layout of the table cells so that I can group fields together so it looks better on the page. I can see how to access the templates but it is not clear which template I need to work on and how I can modify the code. I am 99% up on HTML coding and about 20% on php and mysql.
If someone could show me how to say... split a vertical list into two halfs and put the second half of this list next to the first so that the page displays two columns this would give me enough info.
Thanks for all the help and advice given so far.
Regards
Mike
Yes this is a wickedly clever program.

G
giles 6/24/2006

Hi Mike,

Having reread your post I am not sure why I came to the conclusion you were out to do something not quite right. My apologies, <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=9315&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' /> must have been reading a bit too fast without taking it all in.
As far as I know there is no way of getting two columns of fields on pages without modifying the fiels output by phprunner. I don't think it can be done by editing templates alone. At least not with my knowledge of php.
Now I have seen a newsletter from Xline saying a WYWIWYG editor is on the way but I've no idea how long it will be before it arrives.
In my case I wanted a number of columns of fields so I tried hand editing. Troulbe with that is, the minute you need to make a change (e.g. add a new field or change an edit format) then you have to re-edit.
So I wrote an Access application that does the editing for me. For eqch label and field it allows me to set the order, the number of columns.rows spanned, insert blank cells and other labels, and decide where new rows start. There's a sample of an edit form in my post "WYSIWYG in next release".
Obvously it would be better to wait for Xline to release the WYSIWYG editor however if that is a bit of a way off I'm happy to post the Access application. But please note:

  1. It's not WYSIWYG
  2. It's thrown together so it has minimal error handling.
    If I get some time tonight I'll post it.
    Giles.

M
mike-pt author 6/25/2006

Thanks for that.
I think I will crack on with getting the whole thing functioning correctly first then come back to the layout later, layout is a lower priority.
Maybe I will use your access "tool" if you were to post it.
Thanks for your help and advice.
Mike