Jump to content

jodunno

Members
  • Posts

    310
  • Joined

  • Last visited

  • Days Won

    5

jodunno last won the day on September 18 2024

jodunno had the most liked content!

1 Follower

About jodunno

  • Birthday 01/01/1973

Profile Information

  • Gender
    Male
  • Location
    Berlin, Germany
  • Interests
    Nature and Biology, Programming and Web Development, Forensic Science, sports

Recent Profile Visitors

5,816 profile views

jodunno's Achievements

Advanced Member

Advanced Member (4/5)

16

Reputation

5

Community Answers

  1. target has plenty of documentation, so you shouldn't have a problem implementing it into your code. I do not use wordpress stuff and i cannot help you with that code but here is a sample of target practice and you should be able to work it into your project regardless of the method (css or js/css etc). <!DOCTYPE html> <html> <head> <title>CSS :target Practice</title> <style> ul.tabs { margin: 0px; padding: 4px; list-style-type: none; font-weight: bold; } .li { padding: 4px; border: solid 1px #ffffff; background: #ffffff; } #tab2content { display: none; } :target { border: solid 1px #009900; background: #e0e0e0; } #tab2:target { font-size: 24pt; } #tab2:target > #tab2content { display: block; } </style> </head> <body> <h1>CSS :target Practice</h1> <p><a href="#tab1">Short Description 1</a></p> <p><a href="#tab2">Short Description 2</a></p> <p>...</p> <ul class="tabs"> <li id="tab1">!Product Enquiry</li> <li id="tab2">Product Enquiry <ul id="tab2content"><li>Hello Product seeker</li></ul></li> </ul> </body> </html> https://www.w3.org/Style/Examples/007/target.en.html https://developer.mozilla.org/de/docs/Web/CSS/:target I hope that this is helpful, John
  2. I'm not being rude but math involves numbers. <script> document.write(screen.width); </script> - 20 = not valid mathematics. you must realize that you are assigning a string to the $screenwidth variable and not a number. if you use a number then the following code will work: $screenwidth = 3072; echo $screenwidth - 20; As a string, you could echo the string where you want the script to execute within the dom. But then you cannot use the JavaScript to assign the value to a php variable. PHP is a server-side scripting language. JavaScript is a client-side scripting language. I hope that my post helps you understand what is wrong with your logic.
  3. Hi jtorral, I think that, based upon your posted four-point problem, responsive css is a better method than trying to use php to respond to media sizes. https://developer.mozilla.org/en-US/docs/Web/HTML/Responsive_images media queries can also help for images or overall css adjustments for "other functions on the page like resizing pop up boxes and so on" https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries when you veer away from JavaScript driven pop-up dialogs and move to css modal methods, the above methods will save you alot of hassle, such as trying to post to an included php file and expecting it to receive the post. Have a look at the css and try that method instead. The session should be used to maintain state, which includes databases by storing a user id for repeated querying. You could post CSS questions in the CSS Help forum: https://forums.phpfreaks.com/forum/17-css-help/ And have a second look at what Gizmola posted, John
  4. easy to forget, i guess. I'm used to working on my own projects on an up-to-date xampp installation. I just forgot that we have an outdated dump file. I suppose that it is simply a common mistake when focusing on the code. I have found several resources on the recursive cte topic: https://dev.mysql.com/doc/refman/8.4/en/with.html https://www.mysqltutorial.org/mysql-basics/mysql-recursive-cte/ https://bobcares.com/blog/mysql-recursive-cte/ https://mariadb.com/kb/en/with/ https://mariadb.com/kb/en/recursive-common-table-expressions-overview/ https://matthewdaly.co.uk/blog/2022/12/18/two-techniques-for-handling-recursive-relationships-in-mysql/ I'm going to play with this concept to gain some experience as quickly as possible, although mastering the subject will cost some time. Very fascinating. I need to upgrade my knowledge of sql in the process of this forum. Thanks for the tip, Barry. Now please spend some time relaxing. I have to log off now as my son has an appointment with a doctor. I will be back in a few hours, then i will continue upgrading my sql skills.
  5. yes, of course. I seem to have forgotten that i am using a dump. I need my coffee. LOL but it works with INTERVAL 2 WEEK. meantime, i'm reading about temporary tables, what a fascinating and useful method of retrieving data without effecting permanent storage. I'm enjoying this concept.
  6. yes i see that the recursive code is working. Thank you for correcting me. At least i learned how to use aliases with JOINs. I also Thank you for educating me on this subject. hmm. the query that you designed is working but the last line of sql is returning an empty set for me. I'm using xampp with mysql mariaDB. if i replace the last line with LIMIT 20 to test that the query is working, then i get results. Something is not working with the date. Do you know why?so WHERE FROM_UNIXTIME(p.time) > CURDATE() - INTERVAL 7 DAY
  7. I'm sorry that it didn't work out for you after three hours. I should've included the table structure in the file. My apologies for not properly planning. Barry, you never cease to amaze me. Your code is fantastic and you only had the structure to work with. I hope that i can get my level of sql programming to such a position as to build from table structure alone and it works. I still have trouble with advanced sql since i have neglected this language. But i am learning from you. I decided to take this JOIN concept with aliases and put it to practice. I had displayed the board index forums using basic sql but i noticed that a board structure table exists. I thought that i should be loading the forums according to the board structure, so i implemented your sql concept to arrive with the following query: select s.parentID, s.boardID, s.position, b.title, b.description, b.boardType FROM wbb1_1_board_structure s JOIN wbb1_1_board b USING (boardID); it works 🙂 i have the forums displayed in the order specified in the board structure table. More importantly, i learned from you -- pending your approval. i would like to rebuild the database because from day one i have had a difficult time looking at it. I am not a db architect and my level of sql is currently basic or entry level. However, from what i knw about db design from you and a few others at this forum, the db is not correctly designed. I also do not understand why username and userid has to exist in every table. I thought that one is supposed to relate the tables using a common field, such as id. I do not see this being implemented. But my first goal is to upgrade the php, html, css and sql to php 8, html 5 , css3 and pdo. Then i can look at the db but then i suppose that doing it this way will mean that i have to rewrite the sql parts of my current code. So i have to think about that. Once again, my dear friend, Thank You. You have helped me more than you know. I am going to keep reading sql tuorials in my free time. I need an upgrade too 🙂 Please get some rest, Barry and i hope that your Netflix binging was entertaining and satisfying.
  8. Thank you. You should know that i have a text file of data that you have posted. I always appreciate the wisdom from the top talent here at phpfreaks. I have learned alot from this forum and its top members. I give credit where credit is due. I actually learned how this JOIN is working and i have successfully implemented my own query on the db last night before bed. I'll post the code in a reply to Barry. My point is that i learn from Barry and not simply take code and be on my way. I'm not looking for a free ride, only help when something is above my current level of knowledge. I hope that you have a splendid day, Gizmola.
  9. Hi Gizmola, very helpful post. I've read about this topic for quite some time today and it is very fascinating to me. I should've explored sql many years ago but atleast i'm trying to catch up now. I have learned alot from Barand but i never implemented it with my own code to gain experience. I am learning alot today and your notes are also very helpful. I see how it is working now and it is quite clever 🙂 Thank you for taking time to educate me on this subject. I appreciate your expertise. I appreciate Barand's expertise always, although he may not know it. I hope that you have a pleasant evening and i'll keep experimenting with this concept to gain more experience with it.
  10. I have been reading so much sql that i am getting dizzy. I need a break. I'm going to switch to the html 5 and css 3 code a bit, then i will watch a film with my wife to relax. I'm trying to convert the forum to php 8, html 5 and css 3 with better session handling and security. I hit a wall with the sql code. I just need to rebuild the posts with attachments and finish the index page, then the forum will be stabilized. I cannot believe the sloppiness of this commercial code and database implementation. Anyway, my friend is too old to battle code and i am helping him for free since i use the forum as well. Some experts are in the forum and i'd hate to see it disappear. I'm trying to rescue it from a hacking death. I can tell that sql injections are working on this forum and i believe that bots may be the reason that the site crashes with a session error. I just watched Venom Last Dance and Saturday Night movies. Very good films if you are looking for something to watch. Unless you are not a fan of Marvel or Saturday Night Live.
  11. it is an alias, yes? i didn't know that we could use an alias. I only know basic sql: select what from table_name or from table_name where whatID = thisID etc. i found a cheat sheet: https://learnsql.com/blog/sql-join-cheat-sheet/joins-cheat-sheet-letter.pdf very fascinating!
  12. well i have finally made a dump and sent it to you. I am still trying to find a way to instruct my brain of how i could come up with the same query that you have posted. I really need to master sql now. Not to take any more of your time but what is with the b. t. prefix. How is this working? what do i call it so that i can research it? adding b. and t. to the column seems like a reference that can be used in multiple tables. I have not seen this before...
  13. Hi Gizmola, The links that you have provided are excellent resources. Thank you! I am trying today to understand Barry's code from an sql point-of-view. I really must learn this aspect of programming. I have neglected sql for far too long. Now i have a need to know it and i am struggling. I am trying to learn it but you know how that goes, i will need time to grasp all of this material. I have alot to learn. I always appreciate your insight and also Requinix and Kicken. I have learned alot from all of you. Yet i have failed to master sql. It is biting me in the behind today... Best wishes, John
  14. i have a text file full of notes from Barand. at some point in my programming quest, i will need to learn sql and database design and i only want to learn from pros. Thus, i maintain notes that from posts that you have made here at freaks forum. You really are a fantastic database designer and a master of sql. I admire your knowledge of this field. I mention your name to my wife during discussions about sql. She knows who you are from my time here at freaks. She remembers the database help that you provided for my private messaging system idea for my nature website. From what i know about good db design from your notes, i find this db from the forum to be amateurish and i told my wife that if Barand had built this forum it would be clean, smart, correctly coded and much easier for me to understand. Although i need to strengthen my knowledge of complex sql commands, I am really in kindergarten with sql. regarding the posts table, i made an error: i ran the dreaded select* from posts and it is still running 40 minutes later. so now i know where the 20 years of forum life is being stored. yikes! i do not want to interrupt mysql in mid operation, so i will let the query finish. What a stupid idea of mine ...
  15. You are the best sql programmer that i have seen to date. I have seen you imagine a db and a corresponding form and code both in twenty minutes or less. I would need twenty hours as my sql skills are entry level at best. I appreciate you more than you know. I will implement the code this evening. yes, there is a posts table. I can send it to you later if you wish to look at it for arguments sake. I do not recall the structure since i was trying to rebuild the index page. I was doing fine on the php, html and css side until i hit this wall. i'm not an sql programmer but surely this db could be designed better, yes? i do not think that storing last thread in its own table is correct but i would need your opinion about that since you are a master db architect. I just find this db to be a bit of a wild west scene.
×
×
  • 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.