Jump to content

wantabe2

Members
  • Posts

    68
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

wantabe2's Achievements

Member

Member (2/5)

0

Reputation

  1. Short answer is I DO NOT know how to limit the input of those characters in the code as well as I DO NOT want to know as I am not a programmer nor want to be or pretend to be one. I do work in IT in a totally different realm. The only reason I have been task to do this, is because I have time to do it. With that said, I hope I answered your questions, in hoping someone else will respond instead of getting the third degree with more questions as to how or why I do what I do!!
  2. update super set `name` = REPLACE(`name`, ',' , ' ') I have the following code that removes the comma in a MySQL database column & replaces it with a blank. In the above example, the database is named super & the column is named name. This code works great but currently I'm running the script each day & changing it to also remove periods, question marks, etc. Is there a way I can edit the above code that will not only find & replace the , with a blank space, but edit it so it will find the periods, commas, question mark, exclamation mark, etc all in one run? Please help as I am currently editing the above code to numerous other things to find & replace daily. Thank
  3. I got it working thanks to all your help & thanks again!!! I do have one question though..in this line of code: $sql = "SELECT names FROM clerk_names ORDER BY RAND() LIMIT 1"; The limit 1 at the end of the line, what does that do? If I change it to 2 or 3 what does that do? I have 10 names in the database to randomly choose from, is there any way to change this number so the same name will not be chosen twice without starting at the begining of the DB again? Or in other words, any way to change it so a name can not be chosen twice without all names have already been chosen?
  4. Oh, never mind..I got it LOL I'll give it a try thanks
  5. Where would I add: <?php echo $var ?> in the code I've tried adding it several places & get random errors.
  6. If I try that code I get the below error: Parse error: syntax error, unexpected T_SL in C:\wamp\www\gflow\officer_query\assign_test.php on line 204 on line 204 the code is: $tableRow =<<<TABLE thanks
  7. still don't get it.... why isn't it returning the sql results in the form value?
  8. ok, I think I've just about got it with all of your help & thanks! Below is my code: <?php $mysqli = new mysqli('localhost', 'myusername', 'mypassword', 'flow'); $sql = "SELECT names FROM clerk_names ORDER BY RAND() LIMIT 1"; $res = $mysqli->query($sql); $row = $res->fetch_row(); $randomName = $row[0]; $res->free(); ?> <td><b>Assign To:</b> <br><input type="text" name="clerk_names" size="15" maxlength="30" value="<?=$randomName?>" /><br /> </td> In the mysql databse the databse name is flow. The table the names are listed in is named clerk_names & the only fields in thei table is names & clerk_id. When I put the above code in a form & display it in a browser, in the Assign To: field the value shows <?=$randomName?> instead of the result from the query...have I mistyped something? Thanks again for any help or assistance provided.
  9. for the value=" " Is there any way for me to randomly insert a name in there each time the form is displayed in a browser? I have a list of 5 names I'd like to randomly be displayed. Is that possible?
  10. I have a phpmyadmin database named FLOW. I have a table in that database named NAMES. I have a form that has the below code in it: <td><b>Assign To:</b> <br><input type="text" name="name" size="15" maxlength="30" value="" /><br /> </td> My question is, how would I edit this code to pull the data from the table listed above for the value?
  11. Ok, I'll do that...thanks...What am I doing wrong here with the settings in PHPMYADMIN? Field = last_used Type = timestamp Length/Value = Default = Current_Timestamp Attributes = Null =
  12. I have some php code that supervisors use to assign work to employees. I've added a field named clerks. There are 10 clerk names in the phpmyadmin database..clerk1, clerk2, clerk3, and so on to clerk10. I need for the clerk names to be automatically added to the clerk field in the form when it is opened..for instance, if the form is opened clerk1 is automatically inserted. And the next time it is opened, clerk2 is inserted until it reaches clerk10 & then starts over by inserting clerk1....is this possible?Like I said, I have a table in the database named clerk_names & the clerk's name is listed in this table. The database name is named flow. Any help will be greatly appreciated. Thanks
  13. I have a form with a field for users to type in the current date. My question is, is there any way for me to have the current date to automatically populate in this field? Here's the code I am using: <tr> <td><b>Date Assigned (YYYY-MM-DD):</b> <br /><input type="text" name="date_assign" size="25" /><br /> </tr> If I could get todays date to automatically pop in this that would be great! Thanks
  14. I added this & it didn't work: if (mail($EmailAddress, $Subject, $Message, $Headers)) mysql_query("UPDATE yourtablename SET active=1 WHERE id = $id"); The email was sent but the active field remained a 0 & was not changed to a 1. Any suggestions?
×
×
  • 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.