How to separate many telephone numbers in one MySQL row to display to web page - mysql-5.5

My table is like this,
I need an output like this,
How can I get this using PHP & MySQL?

Easiest - and properly fastest - would be to split it in the code instead of SQL, when it's structured/stored like that.

Related

GoogleSheets - bringing back last "n" characters that are uppercase only

I have data that brings back a name plus the ticker code. I need to extract the ticker code only into google sheets.
using: =IMPORTXML("https://www.coingecko.com/?page=5","//tr") I bring back 100 coins but the first column is for example
Dogecoin9DOGE
or
Ethereum2ETH
or
Ethereum ClassicETC
I would like to create a column that simply has DOGE or ETH or ETC, anyone know of a way to manipulate the 1st column to get to that?
Thanks
the webpage looks like it is 2 separate columns but the extract does not work that way. I was trying to think of a way to count the uppercase values and then maybe use a RIGHT(len(uppercasevalues)) but not sure how to get there.
You can use REGEXEXTRACT.
=REGEXEXTRACT(A1,"[A-Z]+$")

Why can't I use multiple LIKE NOT in google query?

I am currently trying to narrow down my data. I want to eliminate certain values that I do not want to pull in the query.
First I want to eliminate the - (dash)
=query(A1:B,"select A where NOT A LIKE '%-%'")
That works,
But, if I want to continue to narrow down my data I use
=query(A1:B,"select A where NOT A LIKE '%-%' or NOT A LIKE '%WOLF%'")
That does not work. Instead of narrowing down my data it adds the dash back and keeps wolf . How can I keep using NOT like for multiple strings?
Use parentheses to make the logic easier to follow, like this:
=query(A1:A, "where not (A like '%-%' or A like '%WOLF%')", 0)
better to use regex like:
=QUERY(A1:A, "where not A matches '.*-.*|.*WOLF.*'")
Just to add to this conversation, the second query will return anything that does not have Wolf AND a dash in it. So if I have "Wolf-man" and "Gray Wolf" in my data. I will get "Gray Wolf" back but not "Wolf-Man." Why?
The OR operator tells the query to return something if it's not like one OR the other. "Gray Wolf" is not like '%-%'. Even though it would get filtered by the OR '%Wolf%' language, it's captured by the first part of the OR statement, and so the query says "Yes, this is like this or that, since it is like your no-dash language, I'll return it." And visa versa. If you had "Mole-person" in your data, that would pop up, since it's not like '%Wolf%' and the query will say "well, i's got a dash but it's not a wolf, so I'll include it."
Users above suggested the AND operator, since that is what you'll need in order to filter out BOTH wolves AND dashes. The way it is written, a cell must be like BOTH for the query to exclude it.
I hope this clarifies.

google spreadsheets FILTER multiple ranges/columns (A13:B and E13:G)

I was wondering if it's possible to use multiple ranges/columns when using FILTER
Right now I'm simply using the formula multiple times, like so:
=filter((Sheet1!A13:B),Sheet1!N13:N>E2,not(iferror(search("AS -", Sheet1!O13:O))))
=filter((Sheet1!E13:G),Sheet1!N13:N>E2,not(iferror(search("AS -", Sheet1!O13:O))))
I'm wondering if something like this would be possible (example below doesn't work)?
=filter((Sheet1!A13:B,Sheet1!E13:G),Sheet1!N13:N>E2,not(iferror(search("AS -", Sheet1!O13:O))))
I know using QUERY is easier in this case, but I'd like to know if I can do the same with FILTER (since I haven't been able to figure it out)
Yes, this can be done using array notation (curly braces), for example
=filter({Sheet1!A13:B,Sheet1!E13:G}, Sheet1!N13:N>E2)
The notation {range1, range2, range3} means putting these ranges side by side (they must have the same number of rows). Similarly, {range1; range2; range3} means stacking them vertically (they must have the same number of columns).

how to restrict the number of table columns in bapi output

While querying BAPI, we are generally interested in only few columns of a table.
For example PO_ITEMS table (under BAPI_PO_GETITEMS) has 58 columns. While querying, I am interested in only 10 of those columns. But the BAPI response contains all the columns which is a
overhead.
In SQL world, we can always select which columns we want to retrieve. The query response contains only those columns, not all the columns.
I remember I have read somewhere that we can disable unwanted columns coming in response. But when I need it now, I am not able to find information about it.
Can anybody share a code snippet to achieve this? Or specific online resource/pointers would help?
Thanks
Depending on which technology you use to call the BAPI, you can sometimes restrict which parameters are transferred. For example, if you use the SAP Java Connector (JCo 3), you can use the method setActive of a parameter to restrict whether the parameter is transferred. However:
As far as I know, you can only enable or disable entire TABLES parameters or other parameters. You can't enable or disable individual columns.
As far as I know, the BAPI itself does not know about this setting - and even if it would know, few implementations would care.
Sometimes there are additional parameters that allow you selectively enable or disable fields, but that is part of the actual BAPI implementation and not some omnipresent basic technology.
this is not exact answer for your question.i hope it will help.I think we have no option to select certain number of column from a function module tables.but we can access particular row from that table like passing mandatory values from java side .....like this sample code here i did for function module(not table table).
JCoDestination destination = JCoDestinationManager.getDestination(DESTINATION_NAME);
JCoFunction jf=destination.getRepository().getFunction("ZUSER_DET");
jf.getImportParameterList().setValue("FIRST_NAME","username");
jf.execute(destination);
String jfex=jf.getExportParameterList().getString("some column name from return table");
System.out.println(jfex);
it will return a row of table value.you can manipulate whatever you want

Webgrid alternative layouts?

Ok so this is my first question and I think it is a good one. I am wanting to layout a webgrid in MVC 4 C# with a different format than a standard table. What I am looking for is a layout like this example(bestbuy product list example).
I would like to use webgrid because of it's built-in paging and sorting capabilities. I can live with simpler solutions than the one I included but I need it to keep the same general format with a picture on the left and information in a list-like look on the right if possible.
That looks like three columns to me. All you need to do is pass in the appropriate HTML into the format parameter for each column: http://msdn.microsoft.com/en-us/library/system.web.helpers.webgridcolumn.format(v=vs.111).aspx

Resources