Skip to content
Advertisement

Tag: mysql

PHP script does not execute the MYSQL command

I want to update price on invoice with this PHP code (the config file is included, more SQL statements are executed above this): full code (html form): Whole script and things around are working, but the MYSQL exec. isnt working for some reasons (no errors at all) Answer This: should be: Don’t put parameter placeholders inside any kind of SQL

How Can I Identify Which Linked Was Clicked With PHP?

I have connected to my database with PHP and selected a bunch of names with a query. Each name has an id value. I created a while loop that loops through the results and outputs something like this: (id only displayed for explanation purposes) At the linked page I want to run a query like SELECT * FROM database.table WHERE

Php mysql query update of data gives syntax error

This is my php code to update products in database: It gives this error: Answer This code should work: But a better approach would be to use parameterized prepared statements as you are vulnerable now to SQL injections. Also refer to: https://dev.mysql.com/doc/apis-php/en/apis-php-mysqli.quickstart.prepared-statements.html

Change JSON value in database with PHP

I have a params column in my MySQL database containing this: ‘{“usergroup” : “1”, “language” : “ENG”}’; . Can I change only the language value ENG to GER in just 1 step using a standard PDO update? Obviously, I could just SELECT the whole content of my table cell ‘{“usergroup” : “1”, “language” : “ENG”}’; , decode it with json_decode,

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘gelecek_üyeliği_sistemi.action_users, users’ doesn’t exist

I need to get these data from action_users table I have write a query in Mysql and it works fine but when I am trying to Convert SQL Statement into Laravel Eloquent i got this error i am using laravel 8 SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘gelecek_üyeliği_sistemi.action_users,users’ doesn’t exist (SQL: select users.name, users.email, sum(action_users.point) from action_users,users

Advertisement