Ms sql PHP 5.6.30 Umlaute in table name
I have a problem in PHP 5.6.30 The Tablename of ms-sql is with Ö how is it possible to access the table. In PHP 5.3 it worked without any problems.
Has anyone got an Idea?
See also questions close to this topic
PHP session_start without setting Set-Cookie header in response
Quite simply, I want to call PHP's
session_start()without returning the
Set-Cookieresponse header to the browser. It appears that calling session_start() implicitly sends the
Is there any way to do this? I have tried adding an additional Set-Cookie header with an expired cookie in the session_start, and other ways, but nothing has worked and I can't find docs on this.
- treeview with PHP mysql
Restart to default XAMPP or get access for user 'root'@'localhost after changing password
Here is the technical information:
XAMP : 7.2.10-0
MacOS High Sierra: 10.13.6
I reseted the MySQL/MariaDB Root Password by using the mysqladmin command-line utility:
mysqladmin --user=root password "newpassword"
I know that my password change has been accepted, by attempting to connect to the MySQL/MariaDB server using the mysql command-line client in the same directory.
--user=root --password=newpassword -e "SELECT 1+1"
However, when I try to access myphp, I get
mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)
I tried different solutions online, but none worked:
I am not able to change in config.inc.php
because I don't have privileges. None of the solutions in the previous post helped
Edited my.ini and insert skip-grant-tables below [mysqld] Restart MySQL I am able to get into phpmyadmin; however, I don't have user privileges.
Is there a way to restart to default xampp? I would like to have it like it was before changing the password.
Grouping multiple dates in Spark SQL?
I am having trouble grouping the dates in my code.
This is my code so far:
df_tipReview = spark.sql(""" SELECT R.user_id, R.date, COUNT(R.review_id), T.date FROM reviews AS R INNER JOIN tips AS T ON R.user_id = T.user_id GROUP BY R.date, T.date, R.user_id """) df_tipReview.show(truncate=False)
Stackoverflow wouldn't let me embed my photo, so theres a imgur link of my output. As you can see, the same user_id has the same date listed, how would I aggregate that in Spark SQL so that it would essentially look like:
Instead of having that it on multiple lines.
Hash Functions and SQL Unique Index Collision rates
We want to create Hash Unique indexes for all our rows in SQL server. Due to legacy reasons, we cannot use CDC, encryption, etc.
Which ones of these are generally Unique Index safe similar to GUID, and I will not need to worry about collision duplicate rates? I am hearing mixed input on SHA1, but after that I hear they are generally safe.
Also, does anyone have a chart on collision fraction or probability rates for each of these? I am trying to locate on the internet.
How to return the correct start date value from a stored proc in the below case?
I am using below case condition to calculate a StartDate VARIABLE.
DECLARE @StartDate Date = dateadd(day,case when datepart(dw,getdate())=2 then -10 else -8 end,getdate())
AS you can see, if today's date is Monday then 10 days are subtracted from today's date else 8 days are deducted. Since today (10/16/2018) is not a Monday, this would return 10/8/2018 as an output (8 days deduction). If executed on Monday (10/15) then StartDate would return 10/5 as output.
I added a table called Holidays and it has two columns: Holiday Name and Date containing three records for this year. Columbus Day:10/8, veteran day 11/12 and thanksgiving 11/22.
Now the challenging part I have to do is, If returned output of StartDate is 10/8 (query executed today:10/16) which is a holiday(Monday) then output of StartDate should be changed to 10/5 (previous business day, Saturday & Sunday excluded). Also if the output of StartDate is 10/5 (query executed on 10/15) then output of StartDate should be 10/4 since 10/8 was holiday, it won't be counted for deduction of 10 days so instead of 10/5, it should be 10/4.
So in theory it should work as: Check if there are any holidays that fall between today's date and StartDate and if so then use prior day and adjust for mondays accordingly based on the scenario I mentioned above.
Please note that the included statement I mentioned at the top is part of a Stored proc.
How can I make this work, can someone help? Thanks in advance.