My view hierarchy looks like this:
tab bar - navigation bar - table view - view 1 - view 2 (UIWebView)
How can I rotate view 2 so it can be displayed in both landscape & portrait mode?
This code is being used to parse email, it's stored as a table in a mySQL database. I believe it's PHP code. What does the (.+) do?
/A new order has been successfully placed through(.+)Name:(.+)Company:(.+)Email:(.+)Address 1(.+)Order ID:(.+)Date:(.+)Payment Type:(.+)Order Status:(\s*)Accepted(.*)\n(.+)\$([\d\.]+)\s+X/si
Thanks, super-brainiacs!
i have a table employee(id,dept_id,salary,hire_date,job_id) . the following query i have to execute.
Show all the employee who were hired on the day of the week on which least no of employee were hired.
i have done the query, but am not able to get the least. please check if am correct.
select id, WEEKDAY(hire_date)+1 as days,count(WEEKDAY(hire_date)+1) as count
from test.employee group by days
Hi all,
How to search multiple values separated by commas.
ex:
table name : searchTest
id name keyword
1 trophy1 test1,test2,test3
2 trophy2 test2,test5
Points:
If i search for test2 both results trophy1 and trophy2 should be display.
If i search for trophy1 then trophy1 should be as result.
How to solve this issue.
thanks in advance
I'm very surprised that it seems impossible to upload more than a few megabytes of data to mysql database through PHPMyAdmin whereas I can upload a msaccess table easily up to 2 Gigabytes.
So is there any script in php or anything that can allow to do so unlike phpmyadmin ?
I've to import a file from an external source to a postgresql table.
I tried to do it with \copy from , but I keep getting errors (additional columns) in the middle of the file.
Is there a way to tell postgresql to ignore lines containing errors during a "\copy from" ?
Thanks
I'm setting up a directory application for which I need to have two separate interfaces for the same Users table. Basically, administrators use the Users controller and views to list, edit, and add users, while non-admins need a separate interface which lists users in a completely different manner. To do this, would I be able to just set up another controller with different views but which accesses the Users model?
Sorry if this is a simple question, but I've had a hard time finding how to do this.
Hi
I have a huge mysql dump file generated from phpmyAdmin (150 000 lines of create table, inserts....)
The mySql query tool fails to open such a big file.
As a result i can't insert all the records.
Is there a way to do this ?
Thanks
John
Maybe not literally but the query below gets an error near user. If i change it to userZ it works. WHY can i not use that name? Is there a way to specific its a field instead of a keyword? (or whatever it is)
create table Post2 (
id INTEGER PRIMARY KEY NOT NULL,
title nvarchar(max)
NOT NULL,
body nvarchar(max)
NOT NULL,
user integer REFERENCES Post1(id));
I have 3 tables, with 3 fields all the same. I basically want to select information from each table
For example:
userid = 1
I want to select data from all 3 tables, where userid = 1
I am currently using:
SELECT r.*,
p.*,
l.*
FROM random r
LEFT JOIN pandom p ON r.userid = p.userid
LEFT JOIN landom l ON l.userid = r.userid
WHERE r.userid = '1'
LIMIT 0, 30
But it doesn't seem to work.
how can we extract system time in vb and do calculation ie. adding or subtracing time then store change time in oracle database table in earlier format .
Can someone please direct me to process for doing this? I have already done the Login verification exercise using mySQL for the dbase on my host server (thanks to kiksy). Now I am trying to move forward and "Query" from the iPhone a list of "users" that currently occupy the table (iphoneusers) in MySQL. And of course get it back to the iPhone via the php connection.
Any help would be very much appreciated.
ronbowalker
I have sql query statement which used to display the contents in the table.The sql statement consist of a where clause which is to be appended with numeric value as 1 ,2 3 etc depends upon the previously selected content.I am having the numeric value as int and i want it to append to sql statement which is const char.how can i append both the values.Please help me out.
My query is == select * from Book where id=1;
i have the id value is integer
Thanks.
I have a DataTable with column Value and column Name that has 30000 rows. Now i would like to get very fast Name from row that Value has specified. How to do this fast? I have like 40000 requests with various Values to this table.
Hello,
I have the problem, that MSSQL Server 2000 should select some distinct values from a table (the specific column is of the nvarchar type).
There are the sometimes the same values, but with different cases, for example (pseudocode):
SELECT DISTINCT * FROM ("A", "a", "b", "B")
would return
A,b
But I do want (and do expect)
A,a,b,B
because they actually are different values.
Any idea how to solve this problem?
Thanks a lot in advance!
Hello, well the title says it all. Does anyone have an idea? Would need to lock the table for that long on production site, so it is kinda important.
Also, do you have any suggestion how such query could be optimized?
Thanks!
I'm developing a plugin for Wordpress, and I need to store some information from a form into a table in the DB.
There are probably lots of pages explaining how to do this, but I can't find them.
What are the best methods for storing data in WP using WP function?
I've found an old plugin called acts_as_habtm_list - but it's for Rails 1.0.0.
Is this functionality built in acts_as_list now? I can't seem to find any information on it.
Basically, I have an artists_events table - no model. The relationship is handled through those two models specifying :has_and_belongs_to_many
How can I specify order in this situation?
So ... The thing is, the code works in FireFox, no problems. But when I open the same page, it gives me the following error:
"Undefined is null or not an object."
But when I copy the code to a localhost page, it works fine.
Also when I clear my cache in IE it works, but only once, if I refresh after that one load, it gives me the same error.
Here is the code:
<script type="text/javascript" src="datepicker/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
var count3 = 0;
var count5 = 0;
var count2 = 0;
var count4 = 0;
$(document).ready(function(){
$('#switch3').click(function(){
$('#switchDiv3').slideToggle(350);
if(count3 == 0){
count3 = 1;
document.getElementById('switchImage3').src = "images/ArrowDown.png";
return;
} else {
count3 = 0;
document.getElementById('switchImage3').src = "images/ArrowRight.png";
return;
}
});
... (this is the code for each item that is generated)
</script>
And the code that determines the div that should hide:
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="20" align="center" valign="top" style="padding-right: 3px">
<a style="cursor: pointer;" id="switch3"><img width="20" height="20" src="images/ArrowRight.png" id="switchImage3" style="border-style: solid; border-width: 1px; border-color: black;"/></a>
</td>
<td>
<div id="switchDiv3">
<div align="left">
(Contents of the div here)
</div>
</div>
</td>
</tr>
</table>
Any help is appreciated!
Thanks in advance
Hi all and thanks in advance.
I have a small problem which can not resolve, I have this table, and I want to sort by date and group it (but I only show 1 per idCAT)
| id | idcat | name | date |
| 1 | 3 | xx | 2011-01-02 |
| 2 | 4 | xf | 2011-01-02 |
| 3 | 3 | cd | 2011-01-01 |
| 4 | 1 | cg | 2011-01-04 |
| 5 | 4 | ce | 2011-01-06 |
would like to stay that way, try in a way but I can not
| 2 | 4 | xf | 2011-01-01 |
| 3 | 3 | cd | 2011-01-02 |
| 4 | 1 | cg | 2011-01-04 |
I have a code to show a chart o employees.
The data (name, phone, photo etc) are stored in SQLServer and displayed through JSP.
Showing the data is ok, except the image .jpg (stored in IMAGE=BLOB column).
By the way, I've already got the image displayed (see code below), but I dont't know how to put it in the area defined in a .css (see code below, too), since the image got through the resultSet is loaded in the whole page in the browser.
Does anyone knows how can I 'frame' the image ?
<%
Connection con = FactoryConnection_SQL_SERVER.getConnection("empCHART");
Statement stSuper = con.createStatement();
Statement stSetor = con.createStatement();
Blob image = null;
byte[] imgData = null;
ResultSet rsSuper = stSuper.executeQuery("SELECT * FROM funChart WHERE dept = 'myDept'");
if (rsSuper.next()) {
image = rsSuper.getBlob(12);
imgData = image.getBytes(1, (int) image.length());
response.setContentType("image/gif");
OutputStream o = response.getOutputStream();
//o.write(imgData); // even here we got the same as below.
//o.flush();
//o.close();
--[...]
<table style="margin: 0px; margin-top: 15px;">
<tr>
<td id="photo">
<img title="<%=rsSuper.getString("empName").trim()%>" src="<%= o.wite(imageData); o.flush(); o.close(); %>" />
</td>
</td>
<td id="empData">
<h3><%=rsSuper.getString("empName")%></h3>
<p><%=rsSuper.getString("Position")%></p>
<p>Id:<br/><%=rsSuper.getString("id")%></p>
<p>Phone:<br/><%=rsSuper.getString("Phone")%></p>
<p>E-Mail:<br/><%=rsSuper.getString("Email")%></p>
</td>
</table>
And here is the fragment supposed to frame the image:
#photo
{
padding: 0px;
vertical-align: middle;
text-align: center;
width: 170px;
height: 220px;
}
Thanks in advance !
i have two tables
table1 fields
fid,fname,fage
a ,abc ,20
b ,bcv ,21
c ,cyx ,19
table2 fields
rcno,fid,status
1 ,a ,ok
2 ,c ,ok
3 ,a ,ok
4 ,b ,ok
5 ,a ,ok
i want to display rectors like this
fid from table1 , count(recno) from table 2 and fage from table1
fid,count(recno),fage
a ,3 ,20
b ,2 ,21
c ,1 ,19
i try many sql queries but got error
Thanks
in plain english can you explain to me what happens here:
rs.Open "batchinfo", oConn, adOpenKeyset, adLockOptimistic, adCmdTable
what i need to do is to be able to insert values into a table called batchinfo. would this be the best way to do an OPEN?
the only thing i would be doing is inserting values.