|
The problem that we want you to help us in solving it is as follows :
We have an excel sheet containing some data.
We want to import this data to a mySql database to be used by a certain application.
By importing this data through transferring it to CSV format, the data was successfully imported but the Arabic data was not displayed in the application while this data is displayed during browsing the database inside the MySql.
If the data is entered through the application and then retrieved , the Arabic data is displayed correctly.
We need to import this data (excel sheet) inside the MySql such that it is displayed correctly inside the application.
Hint :I'm use UTF-8
|
|
|
|
|
I think a CSV is ascii only. UTF-8 would be lost.
Chris J
www.redash.org
|
|
|
|
|
I traditionally live in the client app world, so minimizing lines of code is more important than performance, so my coding style is heavy on common functions, etc.
Now that I am working on a web app (PHP and mySQL), I find myself second guessing everything. Here is an example. I am working on a shopping cart for an existing site. There are multiple places where the price of a particular product is returned:
Product Page
Cart over view
Buy process page,
receipt print,
etc.
In most cases, the product data (price) is already available, but the price can vary in different circumstances. I'm considering one function that gets passed the important variables, calculated the price of the product, and returns that price. However, to do so will require polling the database each time each price is requested (in some cases that is multiple prices on one page, so multiple calls to the database while the page is loading).
So my question is really one of best practice. How much of a noticeable performance hit does each call to the database take? Is it common to try to reduce the number of mysql calls? Do you not care? should each page have its own code, and just copy paste all over, and tweek each place where common data is shown?
There is a lot of how to questions (I have posted them) but I am hoping the community here can offer some more higher level theory.
Thank you in advance!
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
I cannot answer your question directly,
Some issues first of all if you a can create common function that will be used by multiple page, then make that one function.
From my experience: making software using php sometime helps a lot. specially development time. But I have faced some issue when I cannot depend on php.
I have faced a problem with one of my Software. I had to calculate stock by daily basis, Its not simple calculation which can be based on simple (insert into stock)-sales+(return from customer), Its more complicated than that. Because we have a different kind of stock management just because of type of product. The result is php page suffers big time. it cannot show the result. most case it ran out of memory. So, I solved it by C. I developed this page using C
Another example is, report making. I take support from pdf making class MPDF(they are vanished, i cant find there site anymore). But It cannot handle big data, memory suffers. So, Now I am building them in C. Finally my point is PHP gives a great way of programming but not very good idea in every case...
|
|
|
|
|
Thanks. You say: if you a can create common function that will be used by multiple page, then make that one function.
My main question is if doing so causes multiple MySQL calls that would not otherwise be required, is that bad practice?
Thanks in advance.
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
some of the problem can be solved by single query, some of them are not possible in single queries
if possible use multiple query
|
|
|
|
|
Follow the link below:
http://codeigniter.com/forums/viewthread/202515/
|
|
|
|
|
I find that the iostat in Linux gives the average disk queue length different from Window.
Window use Little's Law, but Linux use "weighted # of milliseconds spent doing I/Os" (Last Field in /proc/diskstats) divided by the duration. I have searched in Google but I cannot find any mathematical explanation on this.
Could anyone give me some pointers? 
|
|
|
|
|
|
I hate you
Re-phrased: could someone give me some reference?
|
|
|
|
|
int x = 0;
int& rX = x;
Sorry. I too could not resist prescribing humor.
Somebody in an online forum wrote: INTJs never really joke. They make a point. The joke is just a gift wrapper.
|
|
|
|
|
Hi,
I want to ask what's similar to visual studio in the PHP world to use for IDE development?
Thanks,
Jassim
|
|
|
|
|
|
I use NotePad++, excellent tool, But you wont get Intel*** support. But you will give you way better environment than vim,
With winscp you can easily edit php file from remote machine.
|
|
|
|
|
|
but all these are editors NOT IDEs so there is no components like the Label, Text, Checkbox, etc just like the way it is there in Visual Studio..
Does this mean all PHP IDEs are just Editors or I can still find real IDE?
Regards,
Jassim
|
|
|
|
|
So you prefer to drag a component from a toolbox rather than hand code? OK, try this ...
Well, then go spend a lot of money buying Microsoft Expressions, even then it might not do everything that you want. However, you could also spend some money hoping that this PHP plugin for Visual Studio, available from here http://www.jcxsoftware.com/vs.php[^], can do what you want, but as I have not had reason to use that VS plugin, thus, I could not possibly comment.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
you are bad
I am kidding..
I am new to PHP development and I was just simply asking if the PHO world has similar thing to more about it...
|
|
|
|
|
As PHP is new to you, go get yourself some tutorial literature.
Such as this book ...
Beginning PHP and MySQL 5: From Novice to Professional, Second Edition by W. Jason Gilmore. Apress
Or such as websites like this ...
PHP 101[^]
Have fun
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Even if Visual Studio did not contain a Visual Designer, a ToolBox, etc, it would still be an IDE. All it takes to be an IDE is to have two or more components that are necessary in software development. Any app that offers editing+compiling+debugging IS an IDE.
http://en.wikipedia.org/wiki/Integrated_development_environment[^]
|
|
|
|
|
Judging from the other posts, you are new to PHP and welcome to PHP by the way.
jrahma wrote: there is no components like the Label, Text, Checkbox, etc just like the way it is there in Visual Studio..
PHP is a Server side scripting langauge and does not have UI components built into the language. You have to still use the HTML UI components and tie in the PHP on the back end to the HTML labels, textboxes, comboboxes, etc.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Google is your friend, use him often; just as here[^].
|
|
|
|
|
Eclipse or ZendStudio .They're open-source software, performing excellently.I think you'll love it
|
|
|
|
|
Hello Jassim,
If you are looking for something free, you can either use eclipse along with XDebug. Take a look at this article:
http://devzone.zend.com/1147/debugging-php-applications-with-xdebug/[^]
If you are willing to spend a few bucks, I highly recommend Nusphere PHPED. You can download a trial version from here:
http://www.nusphere.com/download.php.ide.htm[^]
Personally I prefer Nusphere PHPED over Eclipse, NetBeans, or even Zend Development Environment because I find it a lot more user friendly and Visual Studio like, speaking of which there is also a PHP Visual Studio add-on which let's you develop PHP solutions inside Visual Studio. Take a look at that here:
http://www.jcxsoftware.com/[^]
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
i am alreadu noe using adobe dreamweaver and it is perfect.
|
|
|
|