11,093 Topics

Member Avatar for
Member Avatar for Aeterna

select * from a where a.b_id = $b_id and select count(*) from c where c.a_id = a.id and select count(*) from d where d.a_id = a.id whats the proper way to write this?

0
61
Member Avatar for jespin

Hi all, I have an issue with a PHP and MySQL deletion script where I am basically trying to delete all records for meetings which have expired. For this, on input, I have a date input calendar which inputs the date in the format 2010-01-18 to the database with the …

Member Avatar for jespin
0
191
Member Avatar for stevieup

I just recently found out that I need a secure tunnel client in order to access an API, OK. Then while researching I find way too much conflicting info about what it is exactly. Could someone shed some light? Is it a subscription? Does it live in my PC or …

Member Avatar for rch1231
0
115
Member Avatar for solarb

hi all! i'm new with php and i have problem. I have a submit form in which every user places code.when they submit it in database its displayed normally there, but when i try to view the data in php there are missing elements , as b<<c or <iostream> etc. …

Member Avatar for solarb
0
154
Member Avatar for jasystweb

I would like to understand how to retrieve an Image stored in a mySQL database as a longblob. Once retrieved, assign that image asp.net image control. Heres the code that uploads the pic to the MYSQL database [CODE] If (Not myups.HasFile) Then Return -1 End If 'FileName.PostedFile.InputStream() Try Dim fs …

Member Avatar for jasystweb
0
280
Member Avatar for k2k

i am at the <mysql dir> so i would do [code] scenario 1: mysql -u root -p [/code] i got prompt to enter password as expected. i typed a wrong password and got ejected.. type a right password and i am in. ok this is working fine. [code] scenario 2: …

0
68
Member Avatar for HB25

Hi I have two tables called client and booking, the primary key in client table is clientID which is autoincress number and it’s a primary key, in the second table (booking) the primary key is bookingID and its autoincress number and the clientID is foren key. I have a questions: …

Member Avatar for Babaty
0
6K
Member Avatar for whiteyoh

Hi All, In my php script i need to concatenate 4 tables from a foreign key of dev_id. It will be a select *. I know, for example that 4 tables have a value of dev_id=115, but when i run the script it gets no results. here is my attempt …

Member Avatar for saiprem
0
60
Member Avatar for whiteyoh

Hi all, I have 4 tables that all have a foreign key of dev_id. I want to SELECT * from all of them but it keeps saying "ambigious column". Can anybody advise how to overcome this? Thanks

Member Avatar for whiteyoh
0
105
Member Avatar for okonjiaustin

I am building a website that uses php5 and mysql database. I want to upload images alongside other information. To get other information into the table of the database, this I can do very well, but to upload and display the images alongside other information(which may be done online by …

Member Avatar for janani26
0
187
Member Avatar for dumbncool

Hi, I have a question regarding outer joins. Suppose I have the following 2 tables each having 2 columns. Employee: EmpId, DeptId Department: DeptId, DeptId EmpId is primary key in Employee and DeptId is primary key in Department. Also, Employee.DeptId is foreign key referencing Deparment.DeptId. My first question: 1. Suppose …

Member Avatar for urtrivedi
0
92
Member Avatar for xuexue

hi guys, just wanna ask is there a good software which can help me plot data or draw a line graph in php? these data are dynamic, and will come from the database..just a simple line graph will do. thanks thanks.

Member Avatar for OS_dev
0
94
Member Avatar for ronaldpaul

Hi friends, In my project I'm using multiple tables to sotr the details.There is one main table and in the i'm storing the contact details of the family.And according to the number of members in the family I'm saving the member names and ages in different table.Now what I need …

Member Avatar for darkagn
0
176
Member Avatar for vivobie
Member Avatar for Zingar

hi, im making a vb.net app to make a backup of a mysql database on a remote server. i could do it easily with just one select and then a loop for all the inserts but the thing is, single inserts for lots of rows are really slow and here …

Member Avatar for jaasaria
0
103
Member Avatar for BluMess

Hey, I've come to a bit of a problem - I'm updating a website for users to upload their own games, animations ("toons") and artwork. The trouble is, I've made separate tables for each one, each with very similar structure What I want to do is show, say, the first …

Member Avatar for cane23
0
103
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
54
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

The End.