Jump to content

benanamen

Members
  • Posts

    2,134
  • Joined

  • Last visited

  • Days Won

    42

Posts posted by benanamen

  1. Ok, heres the real deal that I got from another forum site. She is using a handheld scanner to scan barcodes on books and putting all the scan data into one text box. No details on the scanner. Pretty sure their is a better option for the scanner output then dumping it all to one textarea.

  2. The reason why is you NEVER store more than one value in a column. It is beyond a recommendation or an opinion, it is the way it needs to be done. PERIOD.

     

    Kinda like you drive cars from the front seat, not the back seat. Its just the way its done.

     

    Also, study up on database normalization.

  3. While you are still working with those silly double-delimited strings of yours, forget about using SQL.

     

    Break you string into separate records (Prt_id, Oth_id) and store in a separate db table. Then you can do your deletions by matching the tables.

     

    This is the "real" answer.

  4. The problem is your missing value=" " (I think that's what @Barand was pointing out.)

     

    You can also clean up your php by letting Mysql do the uppercase

     

    SELECT id,UPPER(name) FROM stud ORDER BY studName 

     

    ​and by using parenthesis instead of escaping your variables.

    echo "<option value=\"{$row['id']}\" id=\"dropdown\" >{$row['name']}</option>";
  5. After reading your response 10 times I think I understand your response. If I understand correctly, you are using the exact single DB connect file for multiple apps, not duplicates of that file for every app. If that is the case, you will run into problems when you have different groups of Mysql DB users having different logins (Not app users). Really, each app should be self contained and have its own copy of a DB config file. While it is fine for your own personal use to do it that way, it really shouldn't be used as an example to beginners. To be honest, it's a bit lazy.

  6. Actually it doesn't. If the db connection file is included in all your scripts then so will the connection without having to call a function, let alone pass a database name. You set the database name in the connection string for that particular app one time and never touch it again for the rest of your life. The only thing you might ever have to change is the database username and password if you move it somewhere else.

×
×
  • 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.