Hi,
I realise that modified versions of the software should be freely available, but what about the content that is held within a mysql database for instance? does that have to be available too?
Cheers
ke
I have an option for a user to select his/her own theme while logged into the system and this theme is set in a MYSQL Database and called each time the user logs in, this is called by:
<?php $_SESSION['SESS_THEME_NAME']; ?>
Now, I had this working in a PHP file but I need it to work in Javascript instead unfortunately. And I need some help. I looked at the code using the developers tools on Google Chrome and looks like the above code is not resolving within the javascript file. Which makes sense because you can't access session variables within a javascript file (as I found by searching Google.)
The code is basically supposed to set the specific stylesheet based on the value extracted from the MYSQL database. So if the database says Default the script needs to tell the webpage to use the default.css file. And so on and so forth.
My attempt at writing this is as follows:
var themName="<?php $_SESSION['SESS_THEME_NAME']; ?>";
if (themeName == "Default")
{
document.write("<link re='stylesheet' type='text/css' href='css/mws-theme.css'>");
};
if (themeName == "Army")
{
document.write("<link rel='stylesheet' type='text/css' href='css/mws-theme-army.css'>");
};
if (themeName == "Rocky Mountains")
{
document.write("<link rel='stylesheet' type='text/css' href='css/mws-theme-rocky.css'>");
};
if (themeName == "Chinese Temple")
{
document.write("<link rel='stylesheet' type='text/css' href='css/mws-theme-chinese.css'>");
};
if (themeName == "Boutique")
{
document.write("<link rel='stylesheet' type='text/css' href='css/mws-theme-boutique.css'>");
};
if (themeName == "Toxic")
{
document.write("<link rel='stylesheet' type='text/css' href='css/mws-theme-toxic.css'>");
};
if (themeName == "Aquamarine")
{
document.write("<link rel='stylesheet' type='text/css' href='css/mws-theme-aquamarine.css'>");
};
Any help once so ever would be awesome and much much appreciated! I am reaching a deadline :/
I ordered a server for the home office and I would like to partition it with Xen. I think this will keep things clean and easier to maintain. I will be running things like MySQL, PostgreSQL, Tomcat and my own code on this machine.
My question is: what freely available Linux distribution has the best Xen hosting facilities?
Hi ,
I am looking for a solution preferrably 3rd party component , to open / disply word/excel/ppt and PDF document into flex :
Flow is like this :
User uploads any of the file .doc/.docx/.pdf/.ppt etc . This file is then displayed in flex area , without having user to get Office .
( Office WEB Component ) is ruled out because it needs office to be installed already .
print2flash.com sounds good but their problem is they are on windows , my setup is LAMP
PHP / mysql over Linux .
Thanks
I am a web developer and i would like to shift my field to data warehousing.
Can anyone please give me some idea , which langauges or stuff i need to learn like cogonos , datastage, etl
or IF anyone currently working can guide me how can i start , i will thankful to you.
DO i nned to do oracle because i know mysql , sql. My basic understanding with databse is good.
Any books
Is it possible to use annotations to map a default value for a column?
eg. I have a column named 'date' which is supposed to be '0000-00-00 00:00:00' if not date is explicitly given. I know I can add this to the ctor of the Entity. But then the default behavior will no be present in my database backend. (eg. Default column in mysql)
My app has outgrown just the one vps server (using Mediatemple DV). I want to put the database on another server. Does it have to be another Mediatemple server? Is it possible to use another hosting company and will the connections across the internet cause a slowdown if I choose to use say Rackspace or Linode for the DB server?
btw, using mysql
I'm using a MySQL database and accessing it through Java.
PreparedStatement prep1 = this.connection.prepareStatement("UPDATE user_table
SET Level = 'Super'
WHERE Username = ?");
prep1.setString(1, username);
The update statement above works fine however I'd like to get the number of rows affected with this statement. Is this possible please?
Is there still an injection risk when using prepared statements and mysqli_stmt_bind_param?
For example:
$malicious_input = 'bob"; drop table users';
mysqli_stmt_bind_param($stmt, 's', $malicious_input);
Behind the scenes does mysqli_stmt_bind_param pass this query string to mysql:
SET @username = "bob"; drop table users";
Or does it perform the SET command through the API, or use some type of protection to keep this from happening?
What the best way to store CSPC and UPC codes are in Rails? I used integers with SQLite, but had overflow issues when moving to production. I've since switch to strings, but am not sure if a better generic datatype (needs to support SQLite, MySQL and PostgreSQL).
Thanks.
Hello Guys
I am creating a website where users will be able to chat and send files to one another through a browser. I am using GWT for the UI and hibernate with gilead to connect to a mysql database backend.
What would be the best strategy to use so Users can interact together?
Some times whenever I restart the application, which is built on
Java
Struts
Mysql and Jboss 4.05 Version
I get the error as Address already in use: JVM_Bind
Only fix that i know is to restart the machine and try again, it will work.
Else Some times I do Ctrl-Alt-Del and Stop all the process related to Java, some times this also works.
But what is the exact reason and how can we prevent this problem ?
Why does socket.inet_aton returns packed format in python?
If I am storing the IP as integer in Database (mysql), do I have to always extract the integer value or is there any easier way out?
I am trying to insert into a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the SQL-Engine of the day (MySQL, Oracle, SQLServer, Informix, DB2).
I've been wondering if there is a silver-bullet syntax coming from an SQL Standards (For example, SQL92) that would allow me to insert the values without worrying about the underlying database.
Does someone know of a Sqlite manager that I can put on my site, so that I can access it over the web and create/edit SQlite databases. I guess something like phpMyAdmin for MySQL.
I am new to the data warehousing and was just curious to know if oracle 10g or MySql can be used for multi dimensional data warehouse or we can only use something like Hyperion ?
Hello.
I'm more of a SU and SF but now I'm after some help from the SO community.
I'm dabbling in a bit of php coding with databases and am getting a bit stuck with relationships and the like. Can anybody reccomend some books, online or real, that would be a good start for someone new(ish) to php and mysql databases?
Cheers!
I have loaded an associative array of records from a MySQL database table.
The array consists of 1 to 7 rows representing one week of entries,
which might not have been entered for each day.
How can I insert blank rows into the array for the missing days
so that I can easily display the data in a table?
I don't need to update the database with the blanks.
The answer to another SO question was to use this SQL query:
SELECT o.Id, o.attrib1, o.attrib2 FROM table1 o
JOIN (
SELECT DISTINCT Id FROM table1, table2, table3 WHERE ...
) T1
ON o.id = T1.Id
Now I wonder how I can use this statement together with the keyword FOR UPDATE. If I simply append it to the query, Oracle will tell me:
ORA-02014: cannot select FOR UPDATE from view
Do I have to modify the query or is there a trick to do this with Oracle?
With MySql the statement works fine.
I have a PHP array of strings: ie: "Big green car parked outside"..etc
I would like to perform boolean search operations on these strings, similar to MySQL fulltext searching , or Sphinx Searching.
For example, I would like to find all strings containing word "green" but not "car"
Does anyone know of any existing PHP classes or libraries which would help me accomplish this ? Or can anyone suggest any google terms I could search for ?
Thank you in advance!
I have a client asking me to migrate his Sybase application to web. I have worked on PHP/MySQL, C#/Ms-Sql but never worked with Sybase platform!
Please suggest me some ways i can go through this. How would we migrate existing Sybase desktop application to web application?
Thanks in advance.
hi....
i'm now developing phrase english arabic for mobile phone for my final year project.i'm using eclipse(j2me) software.However,one of the requirements of my project is to use local database.I was thinking to use MySQL since i used to use it before,but it has to connect with the server.Thus, i have no idea what database that suitable for j2me(exclude rdms) for this project.can anyone help me??
I am trying to learn website development so I wanted to setup a localhost on my pc. But I found setting up PHP, Apache, Mysql is quite tough than I thought? What is the easy way for this?
I am trying to get yahoo options data into mysql using perl. I found modules to download stock prices, but not options data. Anyone know what would be the easiest way to do that? If I have to roll my own, what modules should I use?
Thanks,
CP