I am running into an issue where URL with querystring parameters separated by & is not getting resolved correctly.
Can anyone please guide on this?
For instance -
consider url
https://www.google.com/?gws_rd#q=Pune&tbm=news resolves to 'news' tab
but https://www.google.com/? gws_rd#q=Pune&tbm=news lands on 'All' tab of google.
Thanks in advance.
The # character indicates the end of the query string and the start of the fragment identifier.
You have to escape it (as %23) if you want it to appear as data.
Related
Having a strange problem in vba access. I have a text control control called txtUserName on a form and am trying to get the contents which is all but child's play. When I try to run or complie, I get the Method or Data Member not found error. However, when I type me. Intellisense shows txtUserName. I have gone as far as copying and pasting the name from the control's properties and still get the error. What am I missing? I am completely perplexed.
Thanks in advance
Don
In this case, I was just building a SQL string. I did find the problem, there was a bad control reference, however, it was not the one that was highlighted (highlighted was the first value in an insert into string and it was actually the 3rd value)
Is your sandbox (https://developers.google.com/drive/v2/reference/files/list) not working properly or am I doing this wrong?
Here's the parameters I'm putting in for q--
'[folderid]' in parents and name contains '[document name]'
^^ folderId and document name are of course replaced with actual things (no brackets) in my search.
Any idea what's going wrong?
Help is greatly appreciated. Thank you!
The problem with your query is the "name" keyword, not "and".
For some reason, in v2, the query textfield for Try It Yourself does not accept "name" keyword. It always returns error "The value of the parameter 'q' is invalid."
But, I noticed that if you changed 'name' with 'fullText', like:
'folderid' in parents and fullText contains 'Android'
then it works. The query is accepted.
However, this seems to have been fixed in Drive v3. In v3,"name" is accepted query keyword. Thus,
'folderid' in parents and name contains 'Android'
works like a charm.
For some reason while using PHPMyAdmin and attempting to save a table, even though I've entered all of the information I usually do I'm getting an alert box popping up with the content "Missing value in the form!".
Here's a screenshot of my PHPMyAdmin console (2 screens merged due to resolution):
PHPMyAdmin Create Table Modal Box
What I've tried so far:
Changing the data types all to VARCHAR with a length of 255 (except for the deindeal_id column, which remained INT with a length of 12).
Encasing description in "`" (bacticks), thinking it may be a reserved word of some sort.
Adding a coalition.
Using different table engines (InnoDB, MyISAM (the one I wanted)).
I'm really stumped as to what could be causing this issue, so any answers would be greatly appreciated!
Looks like a bug. Try going to Settings -> Features -> General tab and disable Ajax.
Then, try to create a new table and it won't use the popup.
I had this issue with the SQL form (where you can paste larger blocks of MySQL code). Not sure if it's a fluke, but I selected all of my input and then hit Go..and it worked.
Did you give it a table name.
I had the same problem & I simply forgot to give it a table name...at the top.
Got the same error, probably a Bug.
What Lex said: "Maybe if you define a column NOT NULL (ie. don't check the box in the Null column, you have to define a default value? – Lex 20 hours ago"
Nope. Doesn't work either and wouldn't make much sense. If you don't define a default value, the server will either insert an empty string, or fail the query; depending on settings.
I just encountered this....
It turns out I was forgetting to provide a name for the new table....
It's a bug I also "met" on phpMyAdmin v.3.5.1 - Disabling Ajax (and by default I love to disable it) will do the job.
Stop & start MySQL service. You can create table.
Yes It's a bug. what I did is to stop xampp (or if you're using wampp),
and then start them again. after that you will be able to create the table in phpMyAdmin
You can also try USE databasename; at the top of your query. In some versions this error seem to happen even if you did select your database, USE databasename; will fix this bug in those situations.
I just encountered this in 4.1.11. Seems to be a bug (again?). Disabling the popup and switching to the original theme resolved it somewhat for me, although you'll be without the popup which is a pain in the behind.
Switch back to Original theme:
Home > Theme: "Original"
Disable the popup:
Home > More settings > SQL queries > Disable: "Edit in window"
I got this problem too and I had opened same database in phpmyadmin in two separate tabs of browser . When I closed one tab and access phpmyadmin, the problem disappeared.
Just to let you know folks. Turning off my AdBlock Plus finally solved it for me. No more Missing value in the form! pop-ups when trying to submit something. Whitelist phpMyAdmin domain in any style or script altering add-on you might use.
Each parameter in a URL can have multiple values. How can I separate them? Here's an example:
http://www.example.com/search?queries=cars,phones
So I want to search for 2 different things: cars and phones (this is just a contrived example). The problem is the separator, a comma. A user could enter a comma in the search form as part of their query and then this would get screwed up. I could have 2 separate URL parameters:
http://www.example.com/login?name1=harry&name2=bob
There's no real problem there, in fact I think this is how URLs were designed to handle this situation. But I can't use it in my particular situation. Requires a separate long post to say why... I need to simply separate the values.
My question is basically, is there a URL encodable character or value that can't possibly be entered in a form (textarea or input) which I can use as a separator? Like a null character? Or a non-visible character?
UPDATE: thank you all for your very quick responses. I should've listed the same parameter name example too, but order matters in my case so that wasn't an option either. We solved this by using a %00 URL encoded character (UTF-8 \u0000) as a value separator.
The standard approach to this is to use the same key name twice.
http://www.example.com/search?queries=cars&queries=phones
Most form libraries will allow you to access it as an array automatically. (If you are using PHP (and making use of $_POST/GET and not reinventing the wheel) you will need to change the name to queries[].)
You can give them each the same parameter name.
http://www.example.com/search?query=cars&query=phones
The average server side HTTP API is able to obtain them as an array. As per your question history, you're using JSP/Servlet, so you can use HttpServletRequest#getParameterValues() for this.
String[] queries = request.getParameterValues("query");
Just URL-encode the user input so that their commas become %2C.
Come up with your own separator that is unlikely to get entered in a query. Two underscores '__' for example.
Why not just do something like "||"? Anyone who types that into a search area probably fell asleep on their keyboard :} Then just explode it on the backend.
easiest thing to do would be to use a custom separator like [!!ValSep!!].
I have a hyperlink with a query string like cgi-bin/filename.cgi?sort=ASC. When I click this link I want it to change its value to cgi-bin/filename.cgi?sort=DESC. And again when I click the link then it should go to its original query string state. Is it possible?
I had posted the same question previously, got an answer also which I have marked as accepted because I found that Jquery tablesorter solved my problem, but now there's a slight modification and I have been told to do it using the query string.
You're not changing the query string. Each time you sort your data, you're creating a new request to your script. When you use "sort=ASC" then the script's output should provide a link for "sort=DESC" and vice-versa.