Calculations from MySQL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #16
    Re: Calculations from MySQL

    Since the query string is $quey1, it should be


    ><?$query = mysql_query($quey1');
    etc........
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • Rob (SA)
      Lieutenant Colonel

      • Nov 2006
      • 586

      #17
      Re: Calculations from MySQL

      Hi George,

      Thank you - made the change but no difference after publishing the page
      Kind Regards
      Rob
      www.gnjgf.co.za
      www.oryan-projects.com

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #18
        Re: Calculations from MySQL

        Rob, you DON'T have "column_val" and "column_label" in your table!
        This was just an example. You need to customize the query to the REAL column names that you have.
        If, in example, the real column is "name", the code should be:

        <?$query = mysql_query($quey1);
        while($row = mysql_fetch_assoc($query))
        {
        echo '<option value="'.stripslashes($row['name']).'">'.stripslashes($row['name']).'</option>
        ';
        }
        ?

        So replace them with the actual fields of your table and try again.
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • Rob (SA)
          Lieutenant Colonel

          • Nov 2006
          • 586

          #19
          Re: Calculations from MySQL

          Hi George,

          Please excuse my ignorance - I dont know the language at all.

          I do understand then that where I have the word column_label I must replace with the field name from my table.

          As fro the Column_val I am at a loss.

          I will persevere with a trial and error method - thanks fro you support
          Kind Regards
          Rob
          www.gnjgf.co.za
          www.oryan-projects.com

          Comment

          • navaldesign
            General & Forum Moderator

            • Oct 2005
            • 12080

            #20
            Re: Calculations from MySQL

            In many cases these are indeed separate columns in the database. In your case, it is the same. If the table column is "name" then you put "name" in both
            If you have two columns (first_name and last_name, the code in the combobox html should become:

            <?
            $connect = mysql_connect("localhost", "******", "*********") or
            die ("Hey loser, check your server connection.");
            mysql_select_db("******a_Members", $connect);
            $quey1="select * from _Form_Nr_3";
            ?>

            in the Before Tag, and

            ><?
            $query = mysql_query($quey1);
            while($row = mysql_fetch_assoc($query))
            {
            echo '<option value="'.stripslashes($row['first_name']).' '.stripslashes($row['last_name']).'">'.stripslashes($row['first_name']).' '.stripslashes($row['last_name']).'</option>
            ';
            }
            ?

            In the Inside Tag
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment

            • Rob (SA)
              Lieutenant Colonel

              • Nov 2006
              • 586

              #21
              Re: Calculations from MySQL

              Hi George,

              I dont know what I am doing wrong.

              I have done what you asked but when trying to publish a Php page it comes out blank.

              The result having done the other changes comes out like this page found at www.gnjgf.co.za/rank.html
              Kind Regards
              Rob
              www.gnjgf.co.za
              www.oryan-projects.com

              Comment

              • navaldesign
                General & Forum Moderator

                • Oct 2005
                • 12080

                #22
                Re: Calculations from MySQL

                There was a syntax error in the code, copy / paste again (I edited it)
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment

                • Rob (SA)
                  Lieutenant Colonel

                  • Nov 2006
                  • 586

                  #23
                  Re: Calculations from MySQL

                  Hi George,

                  Sorry to say this but it doesnt seem to help.
                  I have copied and pasted as requested but to no avail.

                  You may still veiw the cahnge at www.gnjgf.co.za/rank.php
                  Kind Regards
                  Rob
                  www.gnjgf.co.za
                  www.oryan-projects.com

                  Comment

                  • navaldesign
                    General & Forum Moderator

                    • Oct 2005
                    • 12080

                    #24
                    Re: Calculations from MySQL

                    Hi Rob,

                    obviously there is some syntax error. Since i don't see any in the code i posted, it must be somewhere else. Unfortunately php code is not visible in your pages, so i can't say what you might have done wrong.
                    Navaldesign
                    Logger Lite: Low Cost, Customizable, multifeatured Login script
                    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                    Comment

                    • Rob (SA)
                      Lieutenant Colonel

                      • Nov 2006
                      • 586

                      #25
                      Re: Calculations from MySQL

                      Hi George,

                      I have made the changes to myt page which can be veiwed at www.gnjgf.co.za/rankings.html

                      I have tried to produce the same page with php extension but it gives me a blank page - dont know how that happens when I only change one button.

                      Be that as it may - maybe we can know see what needs to be changed in order for it to work
                      Kind Regards
                      Rob
                      www.gnjgf.co.za
                      www.oryan-projects.com

                      Comment

                      • navaldesign
                        General & Forum Moderator

                        • Oct 2005
                        • 12080

                        #26
                        Re: Calculations from MySQL

                        From what i see, your database username is wrong.
                        Also there is a syntax error (which causes the blank page: you have a line return after the final ? in the code i gave you. There should be nothing at all after the ?, so with the autogenerated ">" you should see in the page html:

                        ?>


                        Now, instead, there is

                        ?
                        >
                        Navaldesign
                        Logger Lite: Low Cost, Customizable, multifeatured Login script
                        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                        Comment

                        • Rob (SA)
                          Lieutenant Colonel

                          • Nov 2006
                          • 586

                          #27
                          Re: Calculations from MySQL

                          Hi George,

                          Thanks for the reply.

                          I have made the changes you requested.

                          I have used the database you created *****_Members and am looking to utilise data from form Nr 2.

                          My concern is that when I publish the page for the php option it still comes up blank- however the prveiw looks fine just it doesnt preform the tasks we require to populate the combobox.
                          Kind Regards
                          Rob
                          www.gnjgf.co.za
                          www.oryan-projects.com

                          Comment

                          • navaldesign
                            General & Forum Moderator

                            • Oct 2005
                            • 12080

                            #28
                            Re: Calculations from MySQL

                            Hi Rob,

                            Ok, this is going too long both for you and me. Pls send me again your login details as well as your page, i will fix one dropdown for you, and you can then follow the same for the other dropdowns.
                            Navaldesign
                            Logger Lite: Low Cost, Customizable, multifeatured Login script
                            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                            Comment

                            • Rob (SA)
                              Lieutenant Colonel

                              • Nov 2006
                              • 586

                              #29
                              Re: Calculations from MySQL

                              Hi George,

                              Thanks for the resque and your patience.

                              I will send the info you require to your email address if thats ok with you?
                              Kind Regards
                              Rob
                              www.gnjgf.co.za
                              www.oryan-projects.com

                              Comment

                              • navaldesign
                                General & Forum Moderator

                                • Oct 2005
                                • 12080

                                #30
                                Re: Calculations from MySQL

                                Page sent, pls read my comments.
                                Navaldesign
                                Logger Lite: Low Cost, Customizable, multifeatured Login script
                                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                                Comment

                                Working...
                                X