10,932 Topics
![]() | |
The below mysql query yeilds the following result: [CODE]SELECT COUNT(ProgramType) AS Counter FROm credential_state GROUP BY ProgramType;[/CODE] Results: Counter 4 7 7 I would like return the max from the above (7). The following query is giving my an error that says: Every derived table must have its own alias. … | |
Can any one help me in solving my problem. My problem is I have Windows 2003 server which maintain different user with different authentication. No I am developing a login program in PHP (PHP and CSS file is attached) I need to fetch the user details from Active Directory of … | |
I need to make ten selections. One of all the datetimes in the last 24 hours, the next one from 24 hours to 48 hours, and on back in 24 hour blocks for the last ten days. I've tried various approaches to this, but this is what I currently have: … | |
I tripped on this one. I have an HTML form that has all kinds of input elements - text, textarea, radio buttons and checkboxes. I have no problem inserting or updating data in MySQL DB from the HTML form. But when I want to display what is already in the … | |
I have the following python code to access a MySQL database: [CODE] #!usr/bin/python # server_version.py - retrieve and display database server version import MySQLdb con = MySQLdb.connect (host = "localhost", user = "username", passwd = "password", db = "test") cursor = conn.cursor () cursor.execute ("SELECT VERSION()") row = cursor.fetchone () … | |
Just so you know, I'm a PHP beginner, so I won't understand complicated stuff or anything of the like. xP I've started to make a part of my website (may I link to it, or should I just post the code) and I'm pretty happy with it. A user can … | |
Can someone help me store a string that has an apostrophe within it? I thought that using [B]mysql_real_escape_string[/B] was supposed to add a slash when retrieving, but remove the slash before storing. Here is a portion of my code and then also the result of the data after it is … | |
I got a query to calculate the percentage as , [CODE] Select votes, rating, votes/sum(votes) as percentage [/CODE] But I want to take the values from two different tables. I tried [CODE] Select elec.sum(votes) from elec, stat.sum(rating) from stat where year=2009, elec.sum(votes)/tat.sum(rating) as percentage; [/CODE] This doesn't work. plz help. | |
How can I use Mysql for JDBC connection.How to make data source? I can able to done with MS-SQL. | |
Hello, I have a MySQL 5.0 Database used for management of my service, with 13 tables. The two tables most important now are "customers" and "cust_packages". The table "customers" has one column "cust_email". This column has e-mails of customers of the my service. The table named "cust_packages" has one column … | |
I keep getting this message Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/j/a/c/jackattacksite/html/register.php on line 80 Here's the code: [CODE=php] // Connect to database include_once "scripts/connect_to_mysql.php"; $emailCHecker = mysql_real_escape_string($email1); $usernameChecker = mysql_real_escape_string($username); $emailCHecker = eregi_replace("`", "", $emailCHecker); $usernameChecker = eregi_replace("`", " ", $usernameChecker); // Database … | |
mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); $root = 1; function display_tree($root) { // retrieve the left and right value of the $root node $result = mysql_query('SELECT lft, rgt FROM tree '. 'WHERE name="'.$root.'";'); $row = mysql_fetch_array($result); // start with an empty $right stack $right = array(); // now, … | |
Hi and I have been working on a project involving a rather large database. My question is "For a database with over 20529860 rows, is it better to have 3330 tables spreaded equally or to split into multiple databases or would it be better to have 49950 tables in the … | |
Hi, I am trying to get the primary key (which is number) from a field of the same table. however i encountered "Undefined index" shown on my screen. [CODE] $orange_insert = "INSERT INTO orange (orange_id, orange_name, orange_add) VALUES (NULL, '$val_name', '$val_add')"; $result = mysql_query($orange_insert) or die (mysql_error()); $orange_sel = "SELECT … | |
For example, when searching string_1 in MySQL table found NO RESULT, then want to add string_1 into database table. Using code below: while (res->next()) cout<<"This word means "<<res->getString(2); if (res==0)/[U]/I use this if statement , but don’t work![/U] { cout<<"Would you like to add this word to database?"<<endl; } What … | |
I am facing problem connecting problem connecting remote MySQL server which is firewall protected. I used the valid user name and password, but it throws me the error [I]OperationalError: (2003, "Can't connect to MySQL server on 'www.myreomtemysqlserver.com' (10061)")[/I] I want to connect from python. I searched in Google is there … | |
Hi I really hope I am posting this in the correct forum area. I have a html page on my currently existing web site where I sell books over the internet. I need to change this page so that it can do a search on my MySql database that I … | |
i have a project that implements the using of database. i chose to use php as the application interface and mysql as the database. at the end of this month, we should submit the softcopy. now, i'm confused with the files of my project. i'm using wamp server, and in … | |
Is there a simple way to link up a data website to my newly created Access program? I need specific information to fill in the tables, and currently I am manually entering the info in from the site; it would be much easier to have this website post it for … | |
Hi, I want to create a mysql table in a database in C#. this table should have unlimited fields where the user can add more information to it without having to overwrite the already existing information. I want to do this cos I will not know the amount of info … | |
[icode] "My wamp server got damaged recently and i had no backup for my databases. I had reinstalled the wamp server and replaced the bin/mysql/data folder to the new one but I only get the database and not the tables inside it. I need help!!!!!!!! "; [/icode] | |
Hi, everybody. I've been a member for a while, but I'm not a coder, so I haven't made any posts. But I get frustrated not knowing how to do things. So I'm taking the plunge. I'm working through a tutorial on PHP and MySQL (here: [url]http://dev.mysql.com/tech-resources/articles/ddws/[/url]), and things have been … | |
the following is the code: [CODE] <%@ page import="java.util.*" import="java.sql.*" import="java.io.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <% Integer hit = 0; Connection con = null; Statement stmt=null; ResultSet rs = null; %> <% try { out.println(); Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost/lab2","root","root"); stmt=con.createStatement(); rs=stmt.executeQuery("SELECT hitCount from table1"); hit = rs.getInt("hitCount"); hit = hit … | |
I have a database that needs to hold names of people from all around the world. Some names have special characters in them such as é and ¢ Is there a character set I can use that will accept any character no matter what language it is (with the exception … | |
Hi; I want to connect MySQL database from turbo c++.I have installed MySQL 5.0.Also MySQL c++ connector.But it's not working.How can i connect.Any body have any procedure for it? Is it possible to connect it directly without any connector?If yes,then how? | |
How to handle UTF-8 characters in HTML, JavaScript, PHP and MySQL ... | |
I created some data files with 'outfile ' command. The files are created in the mysql folder.{I use WAMP} I want to create those files in another directory. How can I do that? Thankx in advance. |
The End.