[Solved] Access denied with localhost [closed]

open “config.inc.php” on your PMA folder. add this line to prompt the authentication before login $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’; /* $cfg[‘Servers’][$i][‘user’] = ‘root’; */ /* $cfg[‘Servers’][$i][‘password’] = ”; */ OR manually define your authentication by this line $cfg[‘Servers’][$i][‘auth_type’] = ‘config’; $cfg[‘Servers’][$i][‘user’] = ‘root’; $cfg[‘Servers’][$i][‘password’] = ‘yourpassword’; solved Access denied with localhost [closed]

[Solved] Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, = ,

I see this in a comment: i need more than one value Okay. Let’s run this as a real query then: SELECT NombrePelicula, (SELECT SUM(pelicula.PrecioEntrada) FROM pelicula) / count(*) As Recaudacion FROM funcion GROUP BY NombrePelicula HAVING COUNT(*)>1 solved Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, … Read more

[Solved] I need to join 2 databases, with 2 tables each

With a UNION ALL you can get 1 combined resultset from 2 selects. Then you can group that and SUM the amounts per date. So you’re probably looking for something like this: select q.ID, q.Name, nullif(sum(case when q.Date=”2018-05-01″ then q.Amount end), 0) as “5/1/2018″, nullif(sum(case when q.Date=”2018-05-02” then q.Amount end), 0) as “5/2/2018” from ( … Read more

[Solved] How to Add last column in mysql table

Given the code you’ve posted, here’s how I’d handle this. First, I’d create an associative lookup array whose keys are the column names and whose values are the corresponding point values; it would look something like this: $pointVals = array(’email1′ => 2, ’email2′ => 5, ’email3′ => 2, … ); You can generate this array … Read more

[Solved] Can we protect against SQL-injection by writing Javascript code correctly? how? [closed]

Never try and prevent SQL injection solely by JavaScript. What happens if I turn JavaScript off? Your validation fails instantly. What happens if I modify your JS and remove the keywords you are preventing me from injecting? Always validate it against the server. solved Can we protect against SQL-injection by writing Javascript code correctly? how? … Read more

[Solved] How can I retrieve first second and third word of a String in SQL?

If you don’t want to create a dedicated function, you can use successive CROSS APPLYs: SELECT T.s, FirstSpace.i, SecondSpace.j, ThirdSpace.k, CASE When ThirdSpace.k > 0 THEN LEFT(T.s, Thirdspace.k – 1) ELSE T.S END AS Phrase FROM t CROSS APPLY (SELECT CHARINDEX(‘ ‘, T.s, 1)) AS FirstSpace(i) CROSS APPLY (SELECT CHARINDEX(‘ ‘, T.S, FirstSpace.i + 1)) … Read more