7,368 Topics
|
|
This is my query SELECT DISTINCT brand, category FROM product WHERE subcategory = '$subcategory' My problem is that i want the distinct to work on both brand and category, but it is only working on brand. How could i fix this? |
|
Hello! I need to ask for a little help to build SQL query to delete some records! Table structure: `charId` int(10) DEFAULT NULL, `schameid` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(250) DEFAULT '', `skills` varchar(500) DEFAULT '', PRIMARY KEY (`schameid`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; Some times record `skills` is empty … |
|
Hey everyone, Does anyone know if there is a possible way of using an online Database without uploading the website files onto the server? Cheers, |
|
so i've been working on a database in oracle for a booking system and I am trying to create dyanmic query results... was just wondering if there is a way to create a query to add up all the seats in a arena with booking numbers (not necessarily the same … |
|
I have the following queries (as examples): ~~~ sql SELECT articles.* FROM articles WHERE articles.forumid IN (2,8,118,9,61,58,34,114,112,113,125,124,4,134,42,14,71,181) ORDER BY lastpost DESC LIMIT 0, 30 ~~~ ~~~ sql SELECT articles.* FROM articles WHERE articles.forumid IN (2,8,118,9,61,58,34,114,112,113,125,124,4,134,42,14,71,181) AND NOT deleted ORDER BY lastpost DESC LIMIT 0, 30 ~~~ ~~~ sql SELECT articles.*, … |
|
Ok I need help. I have a couple hundred databases, which are different cities, that I am trying to connect with one query. each city has the same Sports table in it. I want to put the 100 most recent results on one page . The code below gets the … |
|
Hello All I am having an odd issue with mysqldb connection from python to a database. The issue is, when I run the query directly or via a sql client like navicat or toad, I get the required value, but this does not happen via python/mysqldb combo. This is the … |
|
I am trying to change the data type of a primary key in table A from INT(11) to CHAR(11). However, this primary key is a foreign key in tables B and C. SQL is giving me an error whenever I try to change the value type of the primary key. … |
|
Hello: I was wondering if I can get some guidance on how to pull data from mysql and inserted in js array in the following manner var option_array = new Array(num_of_cats); option_array[0] = new Array(\"You need to select a category\"); // This is the first (blank) category. Don't mess with … |
|
Hi all. I am not sure if this should be in PHP or MySql, but it is more relevant to MySl. I am designing a helpdesk for my department. Currently I am entering data into a form, which submits that data to a MySql table. That table is then displayed … |
|
I have this: [code] DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `linkacorte`(vid_pedido int(11), vid_producto int(11),vtiempo varchar(50),vid_pastelero int(11),vcorte varchar(200),vnum int(2)) begin declare campo varchar(20); DECLARE EXIT HANDLER FOR SQLSTATE '42000' SELECT 'Ha introducido un campo incorrecto. Solo se permite 1,2 o 3'; if vnum=1 then set campo='programa_corte_1'; elseif vnum=2 then set campo='programa_corte_2'; elseif … |
|
HI, Could you please explian this code so it will work, { "display **all** from **tablename** **colloum_id** in a **random order** " } I am trying to get all the data echoed into a random string ie. echo = "3,4,5,6,7,3,2,6,3,22,43,132,ect. not in a table. thanks. |
|
Hi, I have created a form and since it is very long some of my users need a SAVE feature so that they can enter some details-> save it, and then fill the blank fields in the future. Most of my form fields are 'textarea' as the data entred by … |
|
Hey Im trying to start from scratch a MySQL installation in Linux but for some reason through apt-get and the software center, when I remove it, my users (and privileges) still exist. How can I remove everything releated to MySQL and start from 0? Thank you |
|
pls suggest me some online tutorials for databases.finding it difficult to learn from textbooks |
|
Hi I am running the following SQL (extract shown below) INSERT INTO users (user_id, username, username_clean) SELECT member_id, username, lower(REPLACE(username, '.', '_')) FROM members The problem arises when lower(REPLACE(username, '.', '_')) produces a duplicate that already exists in username_clean as the users table does not permit duplicates. Is there a … |
|
Hi, I'm developing a blog that will have categories. I want to be able to store blog posts in more than one category. My problem is i am not sure how to go about it. I have a table called posts: CREATE TABLE `posts` ( `post_id` int(10) unsigned NOT NULL … |
|
Hi guys, I'm doing an application that works with an online mysql database. Here is a sample of my code: ~~~ Dim adapter As New MySqlDataAdapter("select * from my_table order by code", "server=my_server;User Id=me;password=password;Persist Security Info=True;database=database") Dim my_table = New DataTable adapter.fillj(my_table) ~~~ On the last line, the application freezes … |
|
Hi everyone, Now a days Justhost & Bluehost are putting restrictions on mysql joins. Even If there are 11 or 12 Joins the query is not running. When you will run the same query in phpmyadmin then, its giving you error message as "#1104 - The SELECT would examine more … |
|
Hi all , I need to insert a value in to a table if that value does not exist more then twice , If once that value exist then it should insert only once .. could any one guide me.. thanks in advance |
|
Each childrow has a parentid and position. For childrows with the same position there is one row where start='1'. What i'm trying to do is return the pending rows with their start row. The results that should be shown are; start(owen) pending(dave,paul). This is because they have the same position. … |
|
I need help making this mysql trigger. I'm creating this student enrollment project and the trigger I need needs to check that there is no course schedule conflicts when a student enrolls in course. Everytime a student enrolls in a class a row is added to the courses database. I … |
|
I have a page that I wrote to upload a text file to a mysql database. The text file has thousands of lines and each line is a separate database row. An identifier at the beginning of each line tells me which table to insert the line into in the … |
|
Hi. I am trying to perform a "process of elimination" type of search using MySql. I have a table with a lot of values that people could search for- and currently if they search for 1 value it works great. But if they search for lets say "value1 value2" it … |
|
Hello, Is there any way of restricting the values returned in MySql? For Example: There's a field in my table called points whihc I want to restrict from 0 to 17 only. This means the values more than 17 are unacceptable for field. Is there any way of implementing that? … |
|
I HAVE MS ACCESS DATABASE OF 'STUDENTS' containing Their roll no's, names, min marks and max marks. As like schools publish results on their webistes, there is a text box in which roll no. is entered and the command button for searching the whole record of roll no. entered in … |
|
Hi all, i have a table like below Id Names 1 Sanjay, Anu, Rock 2 Mohamed, Asif, Selva, Manoj, Booker T 3 Jerrico, Cena 4 Amala How do i select MAX LENGTH OF STRING from column in the table, I need the result like, 2 Mohamed, Asif, Selva, Manoj, Booker … |
|
Sooo ... I learned during my schema migration that our webpages use UTF-8 encoding but our MySQL database (all InnoDB tables) uses latin1. After finally running some utf8_decode() php magic, I was finally able to successfully get all posts to display correctly again. However, now that I realize there's an … |
|
Hi, I was wondering could anyone help me here. In my program, the user selects a document and fill's it out, submits it and receives an email with the information they filled out in. What I am trying to do now is that when the user selects document and submits … |
|
i am unable to store data in database <?php include ("db_connect.php"); $res = mysql_query("SELECT * FROM posts"); while($data = mysql_fetch_array($res)) { $pid=$data['pid']; } echo $pid; $pid=$pid+1; //Get data in local variable $ptitle=$_POST['ptitle']; $uname=$_POST['uname']; $email=$_POST['email']; $pcont=$_POST['pcont']; if ($uname=="" or $ptitle=="" or $pcont=="" or $email=="") echo "All fields must be entered, hit … |
The End.