10,946 Topics

Member Avatar for
Member Avatar for rledesma

I want to combine the following select statements so I can have 1 export file rather than 2. This code selects student information along with their HomeRoom teacher. [code]SELECT students.last_name, students.first_name, students.grade_level, teachers.last_name, students.student_number FROM students JOIN CC ON students.id = cc.studentid JOIN teachers ON teachers.id = cc.teacherid WHERE (cc.course_number …

Member Avatar for rledesma
0
103
Member Avatar for whiteyoh

Hi All, Can anybody put me in the right direction for counting empty cells in a row? Thanks

Member Avatar for whiteyoh
0
83
Member Avatar for codeblock

Hello all, I have a set of IF ELSE validation code ECHOING onto a php web page through a SWITCH staement. Everything works fine all error messages show up correctly. The problem is, after going through 3 conditons it starts to allow entry into my DB(mysql) all other entries goes …

Member Avatar for codeblock
0
185
Member Avatar for bimaljr

I have two tables: [B]1st Table Name : country[/B] [B]Table data:[/B] [CODE]------------------ ID | CountryName | ------------------ 1 | India | 2 | Japan | 3 | China | 4 | Canada | 5 | Denmark | 6 | Egypt | 7 | France | 8 | Germany | 9 …

Member Avatar for pritaeas
0
124
Member Avatar for veledrom

Hi, I deliberately do mistake on line [inlinecode]INSERT INTO table2.......[/inlinecode] but, it still commits despite variable of rowcount is set to 0. How can solve it? Thanks [code] BEGIN DECLARE rowcount INT; INSERT INTO table1 ……… SELECT row_count() INTO rowcount; IF (rowcount=1) THEN SET rowcount=0; INSERT INTO table2 …………….. SELECT …

Member Avatar for ndowens
0
105
Member Avatar for ronaldpaul

Friends, in my project(i'm using php and mysql & i'll be getting all the detail from th user) I've to create a seperate ID for each family. For each family I've to maintain the family members details and the contact details.Now wats the problem is how can I add or …

Member Avatar for urtrivedi
0
168
Member Avatar for ashab27

Thank you Hi, I am Asha Bhatt I have created one table (Question) , which contain 500 of row and 6 column. column name are QusID , Question , Option1 ,Option2 , Option3 , option4 . and in asp.net i have one button and one lable . when i click …

Member Avatar for urtrivedi
0
199
Member Avatar for liro0917

I am using MY SQL when I pulled the informaiton before adding the CUSTOMER_2.dea_license which comes from the other table Customer_2 table everything pulled ok now when I tried to join the other table I get this error Error: A syntax error has occurred. (State:37000, Native Code: FFFFFF37) What is …

Member Avatar for urtrivedi
0
125
Member Avatar for Liles13

[CODE]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/l/i/l/liles13/html/main/libraries/joomla/database/database/mysql.php on line 344[/CODE] Im trying to get a new portfolio site up and running, and I'm very new to PHP. I've read various topics about queries and dropping tables, but I still can't resolve the issue. [CODE]<?php …

Member Avatar for JRM
0
260
Member Avatar for dottomm

Hello. I am having trouble with a count col query I hope some one can help me with. I have six questions and I would like to count how many "yes" answers in each col and then group by that col. Here is my schema table:survey ||id || Q1|| Q2|| …

Member Avatar for dottomm
0
101
Member Avatar for haggis-man

I was hoping that there would be a readonly system or session variable such as @@username or @@user_id or similar Is there any way I can access username information inside an SQL database please? I am hoping to use it to render certain ROWS visible/invisible in views This would be …

Member Avatar for haggis-man
0
84
Member Avatar for jakesee

Hi all, (sorry, I am not sure of the technical terms and jargon) I am currently using MySQL for an "inheritance pattern" (please advice on the correct terminology) where I have a "base table" with auto_increment and "sub_type table" that has id that reference the base id. I see the …

Member Avatar for jakesee
0
80
Member Avatar for gungrave12

Hey guys I Really really need help with an sql query. Apparently I'm missing some big concept and can't figure it out. There are three tables: Customer([U]cust_num[/U], phone, address) Menu( [U]food_name[/U], food_type, price) Orders( [U]cust_num[/U], food_name, quantity) I need to find the phone number of each customer who ordered some …

Member Avatar for urtrivedi
0
82
Member Avatar for ineedalotohelp

I have 2 tables, 1 called journeys, which contains the journeyID, the start station, end station, time to complete, and the distance. The second table is called connections and contains all the stations the train stops at along the journey. I need to write a query which extracts the correct …

Member Avatar for ineedalotohelp
0
149
Member Avatar for codeblock

Hello everyone, I have a problem with my drop down list box on my edit page in php. I would like my drop down list box to show what the user has selected, then if the user wishes to, change their selection updating the DB(mysql) at the same time. I …

Member Avatar for Wraithmanilian
0
243
Member Avatar for crystality

Hi! This is for a homework assignment, and I'm trying to do cascaded deletions on tables that refer to each other. [B] Homework question:[/B] Give an example instance of C and D, having at least 4 tuples in each of C and D, such that a deletion of a single …

Member Avatar for crystality
0
124
Member Avatar for syedirtaza

i have a mysql table which is categoryid categoryname parentid now the senario is that i want to grab all categoryid of a parentid ... like if i put parent id = 12 so that parent id has now become root id and it should get all the sub sub …

Member Avatar for syedirtaza
0
57
Member Avatar for AndreRet

:icon_confused:I have made the change from access to mysql. I am using vb6 to connect. The connection seems to be fine, it was some code sample that I have downloaded from the net. The app is reading the databases, but as soon as I select a database, i get an …

Member Avatar for AndreRet
0
176
Member Avatar for yonker

Two different servers a and b, using the same database and table, select one of the tables, about 3000 records To use phpmyadmin to view, use the default configuration, 30 records per page 1 1 shows, a server page shows spend more than b servers 0.0002-0.0003 seconds (a typically 0.0006 …

Member Avatar for cwarn23
0
73
Member Avatar for anshul09

I have two dropdown lists in my HTML form. In first dropdown list, I have some countries name already added in HTML form. In second drop down list there is no item yet except "Select choice". Now my problem is that I want that when i click on any country …

Member Avatar for Fbody
0
140
Member Avatar for ElegantElephant

[CODE]$query = "INSERT INTO update_feedback (updateID,comment,timestamp) VALUES ('$updateID','$comment',NOW())"; $result = mysqli_query($dbcon,$result) or die('Error saving feedback into database. ' .mysqli_error($dbcon));[/CODE] Gives me this error: [QUOTE]Error saving feedback into database. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax …

Member Avatar for ElegantElephant
0
104
Member Avatar for donnyv

I am new to mysql workbench and databases in general. I have 250 sql files I need to upload to a mysql database and I am wondering if there is a way to do it other than one at a time. If there is a way to do it using …

0
53
Member Avatar for garcon1986

Hello, Now i have 3 tables which are: [CODE]CREATE TABLE IF NOT EXISTS experience( experience_id int(11) NOT NULL AUTO_INCREMENT, salarie_id int(11), consultant_id int(11), post varchar(255), entreprise_name varchar(255), start_time varchar(255), end_time varchar(255), description varchar(10000), PRIMARY KEY(experience_id) ); CREATE TABLE IF NOT EXISTS salarie( salarie_id int(11) NOT NULL AUTO_INCREMENT, name varchar(255), ..., …

Member Avatar for apegram
0
237
Member Avatar for smith78

HI Friends, I tried: I inserted a row in mysql using php in the first webpage and second webpage i tried to retrieve it. I got: But in the next page i did not get the lastely inserted row. When inserted the another row, i was able to get the …

Member Avatar for pritaeas
0
106
Member Avatar for whiteyoh

Hi All, Can anybody give me some good pointers on cause, effect and workarounds for injection attacks please? Id really like to know actual commands that people use, where they use them and how to stop them. Answers on a postcard...............:-)

Member Avatar for pritaeas
0
129
Member Avatar for theshakti

Hi All, I have a table in mysql in which there is a column which have following kind of data $Category=>Income;$NAV=>10.2181;$Repurchase;Price=>0;$Sale;Price=>0;$Date=>26-Feb-2008; I want to Bifurcate the data in that column into 5 separate columns in the same table in this way $Category=>Income in this thing "Income" in column "category". $NAV=>10.2181 …

Member Avatar for theshakti
0
291
Member Avatar for pancgom

Hi, I need some advice on how to edit records from a mysql database using php. Basically the record will be displayed after a particular field is chosen. What i need to know is how can i show the field data in a drop down box one after another and …

Member Avatar for shridhard
0
179
Member Avatar for samaru

[size=4]PHP and MySQL Web Development[/size] [b]by Luke Welling, Laura Thomson[/b] Extremely useful - This is a very useful book. If you're a web developer, and you're starting out with PHP, it will do wonders. It covers many important things such as creating a successful shopping cart, web based e-mail, web …

Member Avatar for berniestein2001
0
640
Member Avatar for lashatt2

I have a question, for example I input something on edit and in that time when I'll click on search button it will show find message, but it shows mysql error :'( why? what I am doing wrong in this code? :( [CODE]HWND edit; char t[MAX_PATH]; char query[MAX_PATH]; GetWindowText(edit,t,MAX_PATH); mysql_query(conn, …

Member Avatar for mitrmkar
0
99
Member Avatar for WickidGRAFX

I have a dropdown list that is automatically populated with book titles from a database. When I select a item from the dropdown list I want a text area next to it to show the description of the book from the database. Is there a way to do this without …

Member Avatar for WickidGRAFX
0
7K
Member Avatar for Venom Rush

Hi all I have a little problem. I have a table that has up 300 rows in it. There is a column where a day and date is inserted. The data looks like this: Monday, 08 March Tuesday, 09 March Wednesday, 10 March Thursday, 11 March Friday, 12 March Right …

Member Avatar for Venom Rush
0
82
Member Avatar for RobotFX

Hi! I'm using various CMSs on my server and since I don't know PHP coding and also don't have the time to modify the scripts, I'm searching for an easy way to disable the MySQL errors. I'm talking about the errors that show in browser whenever the database table is …

Member Avatar for nav33n
0
271
Member Avatar for virtualmisc

Hi, I am using a shared hosting which has EST US time, since i am on shared hosting that's why i cannot change the server time zone but i wanted to display local Indian time to my users. What is a solution for this? Thanks

Member Avatar for pritaeas
0
65
Member Avatar for whiteyoh

Hi all, When running the following i get this error: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null and heres the code: [code] function upload(){ /*** check if a file was uploaded ***/ if(is_uploaded_file($_FILES['userfile']['tmp_name']) && getimagesize($_FILES['userfile']['tmp_name']) != false) { /*** get the image info. ***/ $size = getimagesize($_FILES['userfile']['tmp_name']); …

Member Avatar for whiteyoh
0
609
Member Avatar for Yeen

I have a table that looks like this: [code] Database: Testdb Table: Testtable ID | Value -------------- 1 | 105 2 | 105 3 | 105 4 | 105 1 | 255 2 | 255 2 | 311 3 | 311 4 | 311 1 | 500 3 | 500 …

Member Avatar for Yeen
0
2K
Member Avatar for ayesha789

Hi, I have stored 800 images in root/Images and store link in DB for reference along with another information. There is a search box through which I get all the info. For viewing images I used [ICODE]<a href=".$row['image']." target=_blank>".$row['ch']."</a>[/ICODE] Ch value is click here to view. Now I want that …

Member Avatar for muralibobby2015
0
218
Member Avatar for ElegantElephant

Just wondering if it normal and acceptable use both on one string before entering it into a database or displaying it? For example: [CODE]$project_name = mysqli_real_escape_string($dbcon,htmlspecialchars($_POST['project_name']));[/CODE]

Member Avatar for ElegantElephant
0
82
Member Avatar for prem2

Hi, I am new to mysql.I have two questions. 1)why AUTO_INCREMENT Have primary keys.? 2)Why should we declare default in below example? (ex)create table test (name varchar(15) not null default ''); Regards, prem

Member Avatar for rch1231
0
65
Member Avatar for ramakrishnankt

Hi, my table has id,startdate,enddate,starttime,endtime,salelocation,imagename both dates are in date type and starttime and endtime are in time type. I want to check if my data consisting of startdate,starttime,enddate,endtime cannot be present in table and must be a valid date and time duration. How to check this valid date and …

Member Avatar for ramakrishnankt
0
144
Member Avatar for whiteyoh

Hi all, Im pretty ok with PHP and have recently been breaking down a project using foreign keys to identify various bits of information. This is my problem. I have an items table, which is made up of ID, country and area. It previously has the actual word of the …

Member Avatar for pritaeas
0
138
Member Avatar for xxmp

I have this table publication_en Field Type related varchar(200) public_area int(11) title text detail text file varchar(200) and i am trying to do this INSERT INTO publication_en (related, public_area , title , detail , file) VALUES ('none','1','&quot;helped&quot;','la' &quot;kajakjajk&quot;','J3.pdf') but it doesn't work any idea why it doesn't work ? Thank …

Member Avatar for pritaeas
0
209
Member Avatar for prem2

Hi, I want to learn sql injection.I searched in google but the information is not sufficient to me.Will u provide some links to learn sql injection. thank u

Member Avatar for darkagn
0
303
Member Avatar for druveen

hi i am getting field names in $productname through post method that i have to insert into while loop.... while($res=mysql_fetch_array($result)) { $resproductname=$res $productname;']; } is there any way to do that ...plz help...thanks in advance...

0
60
Member Avatar for bobbymoir

i have some problems with mysql database query and its as below : Tables : i) departments id department description ii) farmers id name sex address age category remarks iii) scientists id departmentid name remarks iv) scientistvisits id scientistid farmerid datevisited purpose remarks Here, i want the query of number …

Member Avatar for darkagn
0
146
Member Avatar for dylank

Hello DaniWeb Community! I am trying to create a web page that utilizes Ajax and PHP to connect to my mySql database and look up a username and password. You have all most likely seen the web page that has the template code on it: [url]http://www.phpeasystep.com/workshopview.php?id=6[/url] This code is nice …

Member Avatar for mwasif
0
4K
Member Avatar for tryphy

Hi friends, I have a form to create a company details.. which will insert the details into a table. For this table, I need to have a auto increment field as character.. when we have autoincreament as Integer... whenever the new company is created..the number will increase from 0, 1, …

Member Avatar for bobbymoir
0
143
Member Avatar for twinki

Hi, I have developed a database web application, in that, a database has 2 tables with same structure. I am using MySQL querybrowser to add, update and delete the records. So, now my question is how can I move the tables records from one table to another, without writing a …

Member Avatar for bobbymoir
0
84
Member Avatar for dre-logics

I Use visual Basic 8.0 and Mysql 5.0 I have one Table1: [COLOR="Red"]Table1[/COLOR]: RecordID , Integer = primary key auto_increment NOT NULL Articlenr , Integer Articlename, Char(20) Table1: has two records: RecordID, Articlenr ,Articlename 1 , 1000, Hamer 2 , 2000, saw I want to use Datagridview to update Mysql …

Member Avatar for dre-logics
0
3K
Member Avatar for restyle

I'm making a photo album with my own CMS, part of it is adding photoalbums to it, but i'm having some trouble linking the "click on album name" to the loading of the correct photo album. my 2 tables are gallery_categories, primary key: id and gallery_assests, primary key: cat_id What …

Member Avatar for restyle
0
152
Member Avatar for whiteyoh

Hi All, Can anybody see why this code wouldnt update the database? Cheers Paul [code] $me = $_SESSION['user_id']; $user_title = $_POST['user_title']; $user_fname = $_POST['user_fname']; $user_lname = $_POST['user_lname']; $user_add1 = $_POST['user_add1']; $user_add2 = $_POST['user_add2']; $user_city_state = $_POST['user_city_state']; $user_post_zip = $_POST['user_post_zip']; $user_email = $_POST['user_email']; $user_password = $_POST['user_password']; // Connect to server and …

Member Avatar for shashankshah
0
105

The End.