|
Just noting that if your intent is that your application will be doing all of the database administration then choosing a database that is less full featured might be a better option. And choosing an embedded database might be a better option as well.
|
|
|
|
|
I am currently running mssql 2008 SSRS on hosting server and whenever I view my report on chrome browser my report shrinks to 25% of the total page width. Please what do I need to do?
Kenny
|
|
|
|
|
|
Hi,
I am having a problem saving from my php for to MySQL database. I am not sure if the problem is at the PHP level or database level.
here is the form:
http://www.jassimrahma.com/contactme[^]
and when submiting arabic characters... it will be saved as unreadable characters like this:
http://www.jassimrahma.com/arabic.png[^]
My database character set is UTF-8 Unicode and Collation is utf8_general_ci
here is my table DDL:
CREATE TABLE `mubadara_messages` (
`message_id` int(11) NOT NULL AUTO_INCREMENT,
`message_from_name` varchar(255) DEFAULT NULL,
`message_from_email` varchar(255) DEFAULT NULL,
`message_subject` varchar(255) DEFAULT NULL,
`message_body` text,
`message_ip_address` varchar(255) DEFAULT NULL,
`created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`message_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
and this is my PHP:
require 'PHPMailer/class.phpmailer.php';
$message_visitor_name = $_POST['txtName'];
$message_visitor_email = $_POST['txtEmail'];
$message_subject = $_POST['txtSubject'];
$message_body = $_POST['txtMessage'];
$message_ip_address = $_SERVER['REMOTE_ADDR'];
$mysql_connection = mysql_connect('mysql.jassimrahma.com', 'jassimdb', 'Mujtaba2013');
mysql_select_db('jassimrahma_com', $mysql_connection);
$mysql_command = "INSERT INTO mubadara_messages (message_from_name, message_from_email, message_subject, message_body, message_ip_address) VALUES ('$message_visitor_name', '$message_visitor_email', '$message_subject', '$message_body', '$message_ip_address')";
$mysql_result = mysql_query($mysql_command, $mysql_connection) or die(mysql_error());
mysql_close($mysql_connection);
exit(header("Location: thankyou"));
can anyone help please
Thanks,
Jassim
Technology News @ www.JassimRahma.com
modified 6-Mar-14 5:57am.
|
|
|
|
|
Not sure. You might need to add a
mysql_set_charset('utf8');
between the connection and the selection of the db.
|
|
|
|
|
Hi,
I want to know if there is any way to retrieve an entire row that has a column with least creation time without using top.
Let us take a sample table named Patient
-----------------------------------------------------------
PatientId Observation Time Value
-----------------------------------------------------------
1 Temp 2014-02-19 03:55:00 35
1 Temp 2014-02-19 03:45:00 37
1 Weight 2014-02-19 03:40:00 60
If i am given the PatientId and Observation, I need to retrieve the the row with minimum creation time
For patient id 1 and observation Temp this would be the row
1 Temp 2014-02-19 03:45:00 37
since it has 2014-02-19 03:45:00 as minimum creation time
|
|
|
|
|
WITH FirstObservation AS (
SELECT PatientID,Observation,Min(Time) Time
FROM MyTable
WHERE PatientID = @PatientID
AND Observation = @Observation
GROUP BY PatientID,Observation
)
SELECT PatientId,Observation,TIME,Value
FROM MyTable m
JOIN FirstObservation f
ON m.PatientID = f.PatientID
AND m.Observation = f.Observation
AND m.Time = f.Time
|
|
|
|
|
Why not using order by and top? Because that is can be fast and effective, specially when you have an index on time column?
Or just because it's an exercise you got at school?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: Why not using order by and top? Just a guess; "it's too slow"
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
And nested select not? It's performance depends only on the proper indexing...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: And nested select not? I did not say that
Kornfeld Eliyahu Peter wrote: It's performance depends only on the proper indexing... ..and the amount of records, the amount of fields in a row, their size, and the speed of the harddisk.
Ya reckon there's an index on the date?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: and the amount of records, the amount of fields in a row, their size
Not quiet right... With indexed table there will be two page reads only (and if the index clustered only one), not matter what size the table is...
Eddy Vluggen wrote: Ya reckon there's an index on the date
I do not think there is a table at all - it sound me like a school exercise...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Damn you Eddy you made try to learn something today!
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Maybe it's just not for an SQLserver. If you want a generic query TOP is out of the question.
|
|
|
|
|
Create a table called "Cheater", containing both PatientId and last updatetime. Set both from a trigger on the Patient-table - do an insert of it doesn't contain the patient-Id, otherwise simply update the time.
Index the table on time, id.
You now have an indexed int/date table for your lookup.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
I am a user of MySql. In Mysql we can go for the query
select * from Patient where time=(select max(time) from Patient);
Hope it will work for you. Check n update.
|
|
|
|
|
Hello,
i have two user schemas.
Let's Say A & B.
A has a procedure written in it SAY 'XProc'.
B has a package which has Procedure say 'B_Pack_Proc', which creates a dynamic view in B user schema.
The B_pack_proc creates view in B schema itself.
but i am executing the B_Pack_Pro from A, i am getting error insufficient privileges.
I am using oracle forms 11g and oracle DB 11g.
i have granted explicit grants to User A from User B
i.e Create any view
Execute on view.
please help.
-
Prathamesh
|
|
|
|
|
Have you given user A privileges to execute the package?
GRANT EXECUTE ON B.packagename TO A;
|
|
|
|
|
i have explicitly granted permission on the view, package and the tables in the views.
still not working
-
Prathamesh
|
|
|
|
|
What's the exact error message?
|
|
|
|
|
I created a table in ms access, and then i wanted to connect it to a java gui front end using type 1 driver. so i tried to create an odbc dsn for access. the test for connection failed while creating the dsn itself. Any suggestions will be extremely helpful, thanks.
|
|
|
|
|
Aravinth Spirited wrote: the test for connection failed while creating the dsn itself. Any suggestions will be extremely helpful, thanks. Did the test fail silently, or was there an error-message?
I suggest you add that message to your question.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Please don't cross-post across forums - Quick Answers MS ACCESS ODBC problem[^] - it won't get your question answered any quicker!
|
|
|
|
|
Use a DSN-less connection like OLEDB. It is much faster than ODBC anyway.
"Go forth into the source" - Neal Morse
|
|
|
|
|
When there is case for writing a many number of mysql command line in VB.NET programming to how to write the module or dll file to handle easily all the command .Please suggest other weblinks or code project article in this discussion. If there is any further idea also add to this discussion.
Online Mysql with VB.Net 
|
|
|
|