• I am trying to build an application with WordPress as the front end. The app must be able to search multiple tables in a database named inmates, not WordPress. Does anyone know of a plugin or method to create a couple search fields on a WordPress page, then send queries on the blackened to return a list of people from those tables to an output page. When I return the list of people, I want to be able to click on there name and open data associated to them that resides in multiple tables. Any ideas woul be appreciated. Thank you

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter cmead

    (@cmead)

    Thank You, I was afraid I would have to do something with CSS. I’m starting from square 1 there. I’ve never done anything with CSS before. Thanks for the direction on this

    Thread Starter cmead

    (@cmead)

    I was afraid that wordpress was applying its own CSS. Every where I look, it claims it is simple to add in your own CSS. Having never used CSS before, and figuring out where to call it in my php template, I am finding it very complex. I used the CSS inspector and there are a ton of rules and other CSS files being called. I’m going to take a look at the !important modifier. Thanks for the tip

    Moderator bcworkz

    (@bcworkz)

    Yeah, it’s simple if you know what you’re doing ?? Advanced coders often forget how bewildering everything is when one enters knowing nothing about it. Or how demeaning it is to describe a process as “simple” or “easy” to a beginner. They are not being mean, but they failed to learn some simple rules about teaching or helping others.

    In my own experience, complex CSS like we see in WP continues to be bewildering because rules that should work don’t, yet some rules work for no apparent reason. In particular, determining the proper selectors can be aggravating. Still, it’s something we need to work with. The CSS inspector tool is an immense help. I cannot imagine working without one.

    Where to add custom CSS in WP is variable. Some themes have a special area in their settings somewhere. If there is one, use it. Where the rules are placed in the hierarchy makes them most likely to work as expected. Other themes have a special CSS file for this purpose. If you made a child theme, use the child’s style.css. That is what I usually do.

    There is also a custom CSS plugin that makes adding CSS relatively simple. It does not simplify creating the rules. Adding the rules to WP is simplified.

    If you get stuck on something, I’ll try to help, but we typically need a live link to the page in question in order to solve any CSS problem. It’s the only way the indispensable inspector tool can be used.

    Thread Starter cmead

    (@cmead)

    Hello, I haven’t been in here in a while as I I using a temp solution until I can develop the full application. So far for the full app, I set up a page which welcomes the user. When they click accept, I will call another page which uses my template. I used the page.php as a base and was wondering if I can put the input(accept) area and then process the input to the query in the same template? Any advice would be appreciated.

    Thank You

    Thread Starter cmead

    (@cmead)

    To elaborate further, here is where I am confused. All the research I do says to create a html form, then pass the data to a php script. If I were to do this in wordpress, I’m not sure how it would work. When I go to the page with the php template, all the coding is contained in the template. If I were to create a page with a html form, the html form would call a php script that would not be my template. This is confusing to me to embed this in worpress. Im not sure how to code the input form in the template and pass the input to the query in the same template.

    Thank You again

    Moderator bcworkz

    (@bcworkz)

    It’s funny you should ask right now as another member recently asked almost the exact same question. My answer there should answer your question as well.

    If you need further clarification, please ask in this thread. Let’s leave the other thread for the OP to avoid any potential confusion.

    Thread Starter cmead

    (@cmead)

    Thank You. I was able to code my input form and am now looking to start my processing code. One thing on my input form is I want to tweak the look, for example put the label on the same line as the input box and move the input area to the center of the screen. I found some examples and created a CSS file in the template directory. I then put this in my template <link rel=”stylesheet” href=”inmate.css” type=’text/css’ > This doesn’t seem to make any difference. Is that the right approach to utilize a CSS?

    Moderator bcworkz

    (@bcworkz)

    You should use an absolute URL to reference the stylesheet — http, domain, path, everything. What’s considered the relative path base is variable in WP. You should avoid any relative references at all. There are a few exceptions, but as a general rule. Use a function like get_stylesheet_directory() so if you ever move the site to a different domain the URL will still work.

    Thread Starter cmead

    (@cmead)

    That is great, Thank you so much. My program is actuatly picking up the CSS attributes now. I was able to utilize this to put my label and input on the same line. I’m just banging my head against the wall right now trying to get the form to center on the page, but I’ll keep at it. Just trying to understand how CSS behaves. When I change classes that are in my form, it seems to affect other areas in my PHP program as well. Thank you again for your direction. I feel like i’m on the right track. one other thing. Have you ever connected to a CTREE database using ODBC?

    Moderator bcworkz

    (@bcworkz)

    Sorry, no ODBC experience. There is a PHP module for it, but you’d probably need to get your host to enable it. Call phpinfo() to see if it’s loaded or not.

    Thread Starter cmead

    (@cmead)

    Hello bcworkz,

    I have what I think is a basic question from the exploring I’ve done. What is the difference in CSS when you create a class such as #form vs just form or #label vs label?

    Thank You for any advice as the # seems to affect the way things are formated

    Moderator bcworkz

    (@bcworkz)

    I don’t quite understand your question, but I’ll pass on some general knowledge, hopefully it’ll help you understand.

    Any HTML element can have certain attributes. Some of the possibilities are class, id, and name. They are declared like so: <div id="foo" class="bar" name="snafu">

    The name is not normally used in CSS. When it is used as a form element, the element’s name attribute is used to determine the array key name in data passed to the server.

    Both class and id can be used in CSS selectors. By the rules of constructing valid HTML, a particular id can only be used once on a page. Classes can occur any number of times. Thus, if you use an id selector on a proper HTML page, the associated CSS rules will only apply to that one element. A CSS id selector is preceded with a hash mark. I could set the color of the previous div element like so: #foo { color: red; }

    I could also set the color like so: .bar { color: red; } using the class selector, which precedes the class with a dot. However, except when a more specific rule overrides our CSS, any other element with class bar will also have red text.

    We can apply CSS to a specific element with only a general, commonly used class if there is another attribute that distinguishes it from all other elements with the bar class by combining selectors. Perhaps our target div with class bar is the only element that has a parent with the id of my-post. We can create a CSS rule like so: #my-post .bar { color: red; }

    This means the red text color rule will only be applied to elements with the bar class that are inside a parent element with the id my-post. Any other bar class elements will not be affected.

    There’s numerous ways classes and rules can be combined, along with pseudo selectors and other operators so that you generally can zero in on any one specific element by being clever with how you construct the selector.

    Thread Starter cmead

    (@cmead)

    Thank You for the detailed explanation.

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘WordPress application to query multiple MySQL tables’ is closed to new replies.