|
$sql = 'SELECT COUNT(1) FROM something';
$result = mysql_query($sql);
$num = mysql_result($result,0);
page gen time dropped to 40 ms when i used this.
thanks!
sam kline
|
|
|
|
|
Use count(*) instead of count(1). The first one will not check if the argument is null, while the second one will evalue the argument once for each record in the table (unless the optimizer is smart enough to recognise that the expression is constant). If the table is using the MyISAM storage engine, you should get a response quite a lot faster than 40 ms, as that engine keeps track of the number of records in each table.
---
b { font-weight: normal; }
|
|
|
|
|
ok i changed it to count(*) but it didnt really make a difference. ive got other mysql queries though, thats what is taking 40 ms.
|
|
|
|
|
Hi,
I am curious to know how we can add tool tip to a dropdown list which is displayed in webpage.
FYI: when the user scrolls the mouse over the dropdown he should see a tooltip which contains the text selected text in the dropdown list
|
|
|
|
|
When i use filesystemobject in my asp page it wont work in my system.. the page will be just searching on the serve.. the other pages are working properly.. this page well in other systems also.. can anyone tell what will be the reason?
regards
hari
|
|
|
|
|
Hello Friends,
Is there any way to find the users action in print dialog box. That is , if we are using a window.print() command in _javascript then it opens print dialog box. It shows us printer setup in that and also it contain print and cancel button. Now i want to know whether user clicks print button or cancel button. If u have any idea about this pls tell me.
N.Rajakumar B.E.,
Application Developer,
www.newdreamz.tk
|
|
|
|
|
No.
Why is it so very common that people don't write what they really want to do. What is it that you really want to do? Find out if the page was printed or not? That is only possible by asking the user, and still the user can lie to you...
---
b { font-weight: normal; }
|
|
|
|
|
Howy folks,
Its been long since I've looked into HTML, and recently while developing a HTA application, I needed to come up with a UI that looks like a standard dialog with HTML elements (e.g. button, text field) that automatically resize themselves when you resize the main dialog window.
If you take a look at: http://www.codeproject.com/dialog/resizabledialog.asp, you'll know exactly what I mean.
For folks acquainted with the .NET framework, there's a property called ANCHOR, which achieves similar effect for UI elements.
Thanks in advance.
TH
|
|
|
|
|
I am registering a javascript on click of a treeview(WebControls) node through code behind(asp.net) using RegisterClientScriptBlock method. The above error is seen. How to avoid this?
Thanks in advance.
|
|
|
|
|
Where is the error message seen?
What part of the code is the error message refering to?
---
b { font-weight: normal; }
|
|
|
|
|
Greetings all.
For various reasons I'm having to use an IFrame to integrate content into somebody elses CMS system and thusly design/code.
This is causing me problems, because I can not get the IFrame to expand dynamically with the content it loads.
This either gives double scrollbars or much extra unneeded spaces.
My IFrame is located within a relative positioned DIV which has position relative on it.
The IFrame then loads my page(s) and displays them.
But I just can't get the IFrame to expand..... *grrr*
Please help me before I go postal on the client
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
Sorry if i sound like an idiot - it's been years since I worked with an iFrame.
As i recall the width and height were passed on the creation of the iFrame.
Do you want the iFrame to:
1) Determine the size of the container that is holding it.
2) Use the size discovered in step 1 to resize itself to expand to fill it's container.
-ward
|
|
|
|
|
I want the IFrame to expand with the content it shows, that is the page which I pass as the source. That size I can't know, which is why I wondered if there was any possiblity of making the IFrame "relative" in size.
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
I am working on a webshpere application coded in javascript, java and html.
My problem is that sometimes, when I am opening an error popup (it is just an alert)
I can't see the image. I have a cross instead like if it could not find it.
The thing is that it does not occur everytime, almost never.
I tried to reproduce this by emptying the IE cache and the jsp one... with no success.
Any hint would help
Pierre
|
|
|
|
|
What im trying to do is write an Internet Explorer sidebar using BandObjects (as described by Pavel Zolnikov at http://www.codeproject.com/csharp/dotnetbandobjects.asp).
In my explorer window am simply displaying a webbrower object which is displaying some webpage.
What I would like to be able to do is be able to gain access to the page being being displayed in the actual browser window (ie not the sidebar browser) and be able to access it using Javascript in my browser being displayed in the sidebar.
Does anyone have any idea on how to do this?
Thanks
Imran
|
|
|
|
|
I want to run a click event on load, is there a way to force a click event. I believe this would be easier than double writing script. I can see the function if I use alert(document.getElementById('?').onclick) but I can't figure out how to have it run.
|
|
|
|
|
Call the click() method of the element.
---
b { font-weight: normal; }
|
|
|
|
|
How'd I not remember that...
Final code:
document.getElementById('?').onclick()
|
|
|
|
|
document.getElementById('?').click();
---
b { font-weight: normal; }
|
|
|
|
|
i have a project for add some facilities to web broweser,so i used the microsoft webbrowser that do the most functionlity for any browser..
but i want when it view the page know its contols,what are X,Y positions for its controls(textboxx,buttons....),how many buttons in Page...somthing like that
may be i have another way 2 get the html and paser it ...but i will need to know how it make rendering for the content of the page
|
|
|
|
|
|
in fact u didnot get what i want....
i wanna 2 add facilties 2 web browser as example when mouse move over on words on the pags
it turned 2 speech..
somthing like that..so i need to know the positions of text..
button.. and so on in any page opend
|
|
|
|
|
This is a tad outside the scope or a quick answer.
Tell ya what, after you write the speech engine let me know and I'll tell you how to do the rest.. heh
Matthew Hazlett
Sometimes I miss the simpler DOS days of Borland Turbo Pascal (but not very often).
|
|
|
|
|
speech engine isnot problem...
it was just example..all i meant that i need 2 access the content of the page that requested..
so consider that i did tts and give me the rest...
|
|
|
|
|
Hi
my site comees up with this error
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/filedelete.asp, line 54
the line code is
for each file in fo.files
Very urgent
Thanks in advance
-ramani
|
|
|
|