Professional Web Applications Themes

String length? - MySQL

I am collecting data from a database. This works fine, I can call the data from these tables and display it as I wish *************************** $ml_collect='SELECT * FROM ml_lopp LEFT JOIN scfmforening ON (scfmforening.scfmnum=ml_lopp.scfmnum) LEFT JOIN ml_newtidplats ON (ml_newtidplats.loppnum=ml_lopp.loppnum) WHERE ml_lopp.sank2006="ja" ORDER BY date1, ml_lopp.loppnum'; $ml_upg=mysql_query($ml_collect); $num_ml=mysql_numrows($ml_upg); mysql_close(); *************************** Now I want to add in a few more tables so I simply expanded the strong associated to $ms_collect to ********************* $ml_collect='SELECT * FROM ml_lopp LEFT JOIN scfmforening ON scfmforening.scfmnum=ml_lopp.scfmnum) LEFT JOIN ml_newtidplats ON ml_newtidplats.loppnum=ml_lopp.loppnum) LEFT JOIN ml_mainkon ON ml_mainkon.loppnum=ml_lopp.loppnum) LEFT JOIN ml_anm ON ml_anm.loppnum=ml_lopp.loppnum) LEFT JOIN ml_avg ON (ml_avg.loppnum=ml_lopp.loppnum LEFT ...

  1. #1

    Default String length?

    I am collecting data from a database.

    This works fine, I can call the data from these tables and display it
    as I wish

    ***************************
    $ml_collect='SELECT * FROM ml_lopp LEFT JOIN scfmforening ON
    (scfmforening.scfmnum=ml_lopp.scfmnum) LEFT JOIN ml_newtidplats ON
    (ml_newtidplats.loppnum=ml_lopp.loppnum) WHERE ml_lopp.sank2006="ja"
    ORDER BY date1, ml_lopp.loppnum';

    $ml_upg=mysql_query($ml_collect);
    $num_ml=mysql_numrows($ml_upg);
    mysql_close();
    ***************************
    Now I want to add in a few more tables so I simply expanded the strong
    associated to

    $ms_collect to
    *********************
    $ml_collect='SELECT * FROM ml_lopp LEFT JOIN scfmforening ON
    scfmforening.scfmnum=ml_lopp.scfmnum) LEFT JOIN ml_newtidplats ON
    ml_newtidplats.loppnum=ml_lopp.loppnum) LEFT JOIN ml_mainkon ON
    ml_mainkon.loppnum=ml_lopp.loppnum) LEFT JOIN ml_anm ON
    ml_anm.loppnum=ml_lopp.loppnum) LEFT JOIN ml_avg ON
    (ml_avg.loppnum=ml_lopp.loppnum LEFT JOIN ml_dist ON
    (ml_dist.loppnum=ml_lopp.loppnum) LEFT JOIN ml_eft ON
    ml_eft.loppnum=ml_lopp.loppnum) LEFT JOIN ml_upply ON
    ml_upply.loppnum=ml_lopp.loppnum) LEFT JOIN ml_konpers ON
    ml_konpers.loppnum=ml_lopp.loppnum) LEFT JOIN ml_konsem ON
    ml_konsem.loppnum=ml_lopp.loppnum) WHERE ml_lopp.sank2006="ja" ORDER
    BY date1, ml_lopp.loppnum';

    $ml_upg=mysql_query($ml_collect);
    $num_ml=mysql_numrows($ml_upg);
    mysql_close();
    *********************
    But this does not work and it returns no data. It seems to crash when
    the string I associate goes over 256 characters. Or maybe its the
    number of left joins I am using? Is there another way to associate the
    string I want.

    Whats the best way to fix this?

    Garry Jones
    Sweden

    GarryJones Guest

  2. #2

    Default Re: String length?

    GarryJones wrote: 

    You seem to have some mismatched brackets.


    Paul Guest

  3. #3

    Default Re: String length?

    > You seem to have some mismatched brackets.- Dölj citerad text -

    $ml_collect='SELECT * FROM ml_lopp LEFT JOIN scfmforening ON
    (scfmforening.scfmnum=ml_lopp.scfmnum) LEFT JOIN ml_newtidplats ON
    (ml_newtidplats.loppnum=ml_lopp.loppnum) LEFT JOIN ml_mainkon ON
    (ml_mainkon.loppnum=ml_lopp.loppnum) LEFT JOIN ml_anm ON
    (ml_anm.loppnum=ml_lopp.loppnum) LEFT JOIN ml_avg ON
    (ml_avg.loppnum=ml_lopp.loppnum) LEFT JOIN ml_dist ON
    (ml_dist.loppnum=ml_lopp.loppnum) LEFT JOIN ml_eft ON
    (ml_eft.loppnum=ml_lopp.loppnum) LEFT JOIN ml_upply ON
    (ml_upply.loppnum=ml_lopp.loppnum) LEFT JOIN ml_konpers ON
    (ml_konpers.loppnum=ml_lopp.loppnum) LEFT JOIN ml_konsem ON
    (ml_konsem.loppnum=ml_lopp.loppnum) WHERE ml_lopp.sank2006="ja" ORDER
    BY date1, ml_lopp.loppnum';

    That was only when I copy and pasted and tidied to posted here, but
    even with correct brackets it works until I put the string over four
    "Left Joins" or 256 characters. Any ideas?

    Garry Jones
    Sweden


    GarryJones Guest

Similar Threads

  1. string length
    By Jeremy Watts in forum PHP Development
    Replies: 1
    Last Post: April 22nd, 07:08 AM
  2. string length?
    By Bob in forum PERL Miscellaneous
    Replies: 36
    Last Post: September 24th, 11:39 AM
  3. How to get length of string? length() problems
    By Mitchua in forum PERL Modules
    Replies: 5
    Last Post: July 17th, 12:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139