Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. That's just it though - you need much more than "simple help". As I said before - read a book - learn the old fashioned way. When you get something developed that resembles good code and need some help, then we'll be more than willing to help. BTW - nice try on your spelling corrections but you still have it wrong. tsk, tsk. At 13, perhaps you should be concentrating more on school - reading, writing, arithmetic, and such instead of trying to learn programming. Those things will get you much farther in this world than learning how to program. Spelling too!
  2. Sorry - but you're digging yourself in deeper. 1 - your grammer is not good. Check your uses of tense in your last post... tsk, tsk. 2 - examples of your perfect spelling: <li><a href="#">Freinds</a></li> <li><a href="#">Cirlce</a></li> 3 - if your isp is providing you such great help, ask them for more. Sorry - I've done enough here.
  3. Where did you get the idea to use foreach???? From some other example? Read up on what foreach does. Then think about what you want to do and how to access arrays. And then the solution should be plain.
  4. Why is it so obvious? 1 - you select a db with a numeric name - very unusual IMHO. 2 - then you query a table that is named the same as the db - also very unusual. 3 - you write a query that has no criteria in it to get the specific record you need 4 - then you attempt to access the results of a query but you're feeding it a query string 5 - then you attempt to echo the resource supposedly returned from your (non-executed) query, but again you are providing the query string So - I'd say it's pretty obvious. Read your book; learn how to use the mysqli functions in php; then attempt this code again. With so much wrong with your code it is meaningless for us to offer you assistance. And - learn how to spell too! You'll make a better impression.
  5. It is obvious you have ABSOLUTELY NO KNOWLEDGE of anything you are doing here. Try a book.
  6. Might I suggest that you post code that others may not find patently offensive?
  7. Where do you execute your query? Not that the query makes sense.
  8. Can't use a bound variable that has multiple values. Read the manual
  9. You signed up for a class (required or otherwise) and haven't done the learning part and want us to do your homework? Send me your professor's name and address and I'll tell him/her that the school is too demanding for you and that you should be excused from having to do any actual learning. No charge!
  10. How do you know it's not working? You don't output anything. 1- Remove the leading % sign in your like argument. 2 - I'm assuming that 'subhire_id' looks like "2014.1065.nn" ?
  11. Psycho - you are leaving out the display of the current row when there is a break on a category. One needs to output the total line when there is a break but then you have to display the current data in the next row,
  12. This tells me absolutely nothing other than you need to order by Name And Contact
  13. What does this do for you? for ($I=0; $I<1; $I++) Why not just echo $pic[0] ? So anyway - you have a div that is of unknown width; perhaps that is the problem. Also - I am unaware of any <large> or <red> or <text> html tags. Are these something new?
  14. Dump the colspans you dont' need them. Learn how to put column headings in an html table (read a reference on html - plenty out there). Hopefully your sample is just not bothering to display actual variables and that you do know how to show php vars in a table.
  15. I'd start by writing better html. Have no idea what your first few lines are doing. As for keeping things on a line.it all depends on the width of your available screen space. Are you controlling that somewhere? (Tip: try using single quotes in place of your slash-double quotes. It's not only easier to write but much easier to read.)
  16. I think the OP needs to think more about what to display rather than what to read. The way this kind of thing is done (the same way every time) is to be sure the items are in the right sequence; check for a break in a category and output what needs to be done for that category; then output what is on the current record, remember to display those 'header columns' that need to be reset with this latest change. Remember to check your category changes in reverse order too. The major category, then the 2nd major one, and so on. When a category changes you need to be sure to handle totals for each category below that one as well as the breaking one. Once you figure this out you'll be amazed how easy it is and you'll have the technique for the future in all your projects.
  17. You have a space between your slash and your url name. Specify the url correctly and perhaps it will work.
  18. I don't read external files, so my purpose in answering is to ask if you have made the effort to add some debugging info to your modules to be sure that what you expect to happen is actually happening as the flow passes thru each module. A few echo's can go a long way towards isolating your problem so that THEN you can post the offending (small) section of code and perhaps get a quicker answer.
  19. For those reading along here is my final query: $q = "update tms_test_matchdata p join (select m.* from tms_test_matchdata m where m.Tourn_key='$tourn_key' and m.Printed IS NULL) s on p.Tourn_key=s.Tourn_key and p.Eventcode=s.Eventcode and p.MatchId=s.MatchId set p.Printed='Y'"; Note the placement of the set clause.
  20. Well, I'll be! That worked. Odd - that putting the set at the end made all the difference.
  21. Re: your last As I said earlier I don't know that a huge IN() list would be acceptable. It could have 200+ entries in it.
  22. This is what I'm trying now. <? $q = "update tms_test_matchdata p set p.Printed='Y' join (select m.* from tms_test_matchdata m where m.Tourn_key='$tourn_key' and m.Printed is null) s on p.Tourn_key=s.Tourn_key and p.Eventcode=s.Eventcode and p.MatchId=s.MatchId"; ?> The error I get is check the manual that corresponds to your MySQL server version for the right syntax to use near 'join (select m.* from tms_test_matchdata m where m.Tourn_key='TMStest' and ' at line 2
  23. No they don't. The FldA and FldB that I mention are unique as a combination though.
  24. Let me add some more info to my problem. My data is involved with the game of handball and is the match data for a tournament. FldA represents the event code for the match of which there are many. FldB represents a unique match id for an event code. There can be many similar match ids but NOT within an event. For ex., FldA can be MB, MC or MO. FldB can be R1S0108, R1S0207, R1S0304, etc. These values can exist in every single event, BUT for a specific event only once. My select query has pulled a set of matches (records) that match some criteria and after I have finished using that data I want to go back and post something in one of my tables for every record that was selected and processed. So I want to run an Update query without having to re-generate this huge query again (there are 8 tables in it and there can be upwards of 200 rows in the result). I could re-write the query to only cull out the bare minimum (but essential) data which would use only one table, but I still don't know how to get my update to affect only each of the records in that select query Something like this: update match_table a set printed ="Y" join (select eventcode,matchid from match_table where eventcode='MO' ) b on a.eventcode = b.eventcode and a.matchid = b.matchid is what I'm thinking. Can anyone confirm that this would work?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.