Jump to content

Barand

Moderators
  • Posts

    24,604
  • Joined

  • Last visited

  • Days Won

    830

Everything posted by Barand

  1. The "Activity" page no longer has a "condensed" option. Selecting condensed has no effect and on refresh it reverts to "Expanded" mode. (This worked fine "last year" and the problem seems has appeared overnight)
  2. Merely defining a query string does not execute the query. If $name is empty you have "LIKE '%%' " which will match every record in the table
  3. Just before the" new mysqli()" line in that case. That's the statement that is connecting to your db server.
  4. Always put this line of code mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); before the line in your code that calls mysqli_connect()
  5. I guess the designers of the forum software thought emojis were far more important
  6. I have no such problems with my phone
  7. What if you rotate to landscape?
  8. It does disappear with narrow display sizes. Try shrinking your display (zoom out/ Ctrl-minus)
  9. Are you checking if data has actually been POSTed if ($_SERVER['REQUEST_METHOD'] == 'POST') { $nine = $_POST['username2']; $codx = $characters[$nine]->name; } else { echo "NO DATA!"; }
  10. It's [ code ]…[ /code ] (but without the spaces) or just use the <> button on the toolbar
  11. I appreciate that you need to reformat the date, but why to one with a different day, different month and 18,000 years later? However, one way to do it is to treat your date as a string value initially (ie column type VARCHAR) while you do the import. Once imported, run an update query to reformat to correct date format UPDATE mytable SET datum = TO_TIMESTAMP(datum, 'DD.MM.YYYY'); Once you have the correct format you can alter the column from VARCHAR to DATE type
  12. I cannot understand why you would change to
  13. The fastest way, by far, is to export from Access into a CSV file then use a LOAD DATA INFILE command in SQL to load the csv into the database table. The next fastest way is to take advantage of MySQL's multiple insert queries EG INSERT INTO mytablename (col1, col2, col3) VALUES (1, 'aaa', 'bbbb'), (2, 'bbb', 'cccc'), (3, 'ccc', 'dddd'), . . . (998, 'ddd', 'eeee'), (999, 'eee', 'ffff'); and load several hundred records with each insert. The slowest way is to iterate through a file, inserting one record at a time.
  14. What is the form method of the form that contains your username2 input? Is it POST?
  15. Still waiting to know what's being sent by your ajax request Example...
  16. Does this simple script work? <?php echo file_put_contents("ValidationsRedeemed.txt", 'This is a test' . "|", FILE_APPEND); ?> (It should output 15 to the browser and add "This is a test|" to your file)
  17. Personally, I'd go with file_put_contents('filename', 'content', FILE_APPEND); So much easier than fopen(), fwrite(), fclose().
  18. Alas, {}s are part of the variable variable syntax edit: $a = 'foo'; $$a = 'bar'; echo $$a; //--> bar echo ${$a}; //--> bar echo $foo; //--> bar
  19. @ginerjm those currency symbols need escaping otherwise they are interpreted as variable variables ($$price, $$number) <td>\${$price}</td> <td>\${$number}</td>
  20. Which variable doesn't echo out. They all do for me once I put something in them. (BTW, You should've learnt to use code tags by now.)
  21. A single = is an assignment operator, so if ($validation = "true") assigns the string "true" to $validation. In your second code example you are checking equality correctly but your are checking if it is equal to the string value "true". This will suffice... if ($validation) { as this means "if validation is true"
  22. Sounds like you're not doing it correctly.
  23. SELECT school , city , TRIM(REPLACE(school, city, '')) as new_school FROM school;
  24. If you have a syntax error elsewhere in the script (and it sounds like you have) then it will not run at all, so your error reporting statement cannot be executed. Error reporting needs to be defined in the php.ini file.
  25. As I obviously cannot run the script to see for myself, perhaps you would be kind enough to give me an example of the data being passed. My main concern is the structure of your code. You are running a query to get an array of ids and then looping through that resulting array to run queries based on those ids. Running queries within loops is extremely inefficient. You should be running a single query which joins the tables on those ids to get the data you require.
×
×
  • 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.