10,946 Topics

Member Avatar for
Member Avatar for Flybro

Hi, I tried to use dynamic table names like: [CODE]create table outgoing_%Y%m%d ( ip_src CHAR(15) NOT NULL, ip_dst CHAR(15) NOT NULL, src_port INT(2) UNSIGNED NOT NULL, dst_port INT(2) UNSIGNED NOT NULL, stamp DATETIME, PRIMARY KEY (ip_src, ip_dst, src_port, dst_port, stamp_inserted) ); [/CODE] but every time i got message about syntax …

Member Avatar for drjohn
0
121
Member Avatar for avilporwal

Hello, I am stucked while making code in PHP. I actually want to make a table in database with name as username (of the respective user). (table should be formed only when no such table exisit before) I used session to get username and every thing is right except formation …

Member Avatar for diafol
0
91
Member Avatar for andydeans

hi i need to create a query that will query my 6 tables that have an amount column & date paid column. i need to total up all the amounts due, so therefore the datepaid column would be null. can anyone help how i would be able to view how …

Member Avatar for andydeans
0
158
Member Avatar for makachuki

Hey Guys. I am quite new in C# and MYSQL, but u can definetly help me out! I am supposed to insert a new row to MYSQL server, i am unable to do so after too much of browsing kindly help me... the code till now is as... string connStr …

Member Avatar for chetanbasuray
0
74
Member Avatar for Vigasdeep

Hello, i'm having 2 tables one is CLG and other is STUD. in CLG(columns CID-autoincrement and CName) and in STUD( three columns are ID-autoincrement,Name and CID) > im using this code to store the records into tables [CODE]$sql="INSERT INTO clg (Cname) VALUES ('$_POST[cname]')"; $id=mysql_insert_id(); $sl="INSERT INTO stud (name,CID) VALUES ('$_POST[name]',".$id.")";[/CODE] …

Member Avatar for Vigasdeep
-1
116
Member Avatar for piers

Please can you help. I have been trying create a form to insert some data into a database. (I am coding with PHP and MYSQL). When I put any data into the field called enter treatments completed the database gets updated with the treatments_completed column containing a 0 and then …

Member Avatar for piers
0
118
Member Avatar for rainhider

[CODE] $result = mysql_query("SELECT * FROM Users") or die("could not select ".mysql_error()); if (!$result) { echo 'Could not run query: ' . mysql_error(); } $rows = mysql_num_rows($result) or die("no rows" . mysql_error()); if ($rows > 0) { $row = mysql_fetch_assoc($result); while ($row = mysql_fetch_assoc($result)) { print_r($row); }[/CODE] Every time I …

Member Avatar for rainhider
0
122
Member Avatar for perceptiveforce

When a user logs in, the user is directed to a page called accountsummary.php. I have sessions enabled. I can successfully echo the inputed username, and echo the ENTIRE column of firstname and lastname for the entire table. The problem is that I do not want to echo the entire …

Member Avatar for fobos
0
322
Member Avatar for JohnNemec.com

I’ve been fighting this for a few days now. I’ve found some wonderful tutorials that get REALLY close to what I’m doing, but I guess I’m too dumb to figure the last step out. I understand it in theory but I’m hoping someone can help me complete this project. What …

0
80
Member Avatar for s_kanika

I've LAN in my office . We work on local server there but.... is it possible for me to access localhost from my home situated far away from office? Plz help me?????????

Member Avatar for pritaeas
0
61
Member Avatar for bobbysands

I am accessing the mysql DB via TOAD and I am getting the below error "MySQL Database error - select command denied to user for table 'proc'" When I click on the Procedures I dont see the list of SP's and see this error. When I execute the below script, …

Member Avatar for nasavietnam
0
600
Member Avatar for rukshilag

[CODE]//only completed successfully if($cs =='yes') { $sql = "select * from past_participant where completion LIKE '%$cs%'"; $result = mysql_query($sql); $num_rows= mysql_num_rows($result); } else if($cs =='no') { $sql = "select * from course_participant FULL JOIN past_participant ON completion LIKE '%$cs%'"; $result = mysql_query($sql); //$num_rows= mysql_num_rows($result); }else if($cs =='current') { $sql = …

0
67
Member Avatar for keithyg

[B]SHA1 my password fields all at once by running a query, I need to know how to write the query[/B] What I want to do is update all password fields in my database to be SHA1 Can anyone help me to run a query to update all fields as I …

Member Avatar for drjohn
0
2K
Member Avatar for rukshilag

ok so i have to tables and i want to have a query that selects all from "table a" and "table be" where "a certain variable"="$x".. how do i select all from 2 tables at once?

Member Avatar for liamfriel
0
104
Member Avatar for nonshatter

Hey guys, this is probably a really simple question for you experts so I hope you can help..! Basically I have three separate html fields for the user's date of birth: "year" "month" and "date" All I'm trying to do is to take these three from the form and insert …

Member Avatar for nonshatter
0
112
Member Avatar for mangel.murti

hi all,,, i am storing word document in mysql db. i have to email those word document form mysql database how to do it?

0
64
Member Avatar for verbob

What I would like to do is search a MySQL table for anywhere from one to 12 seprate fields, depending on what is submitted from a search form(has 12 different things that a user can search -- its an "AND" search only) What I am unsure of is how to …

Member Avatar for verbob
0
132
Member Avatar for andydeans

hi, i had a post in php re display a countdown for policy, it got side tracked to inserting the date properly into mysql database. that is now resolved. what i have is a database setup like this, and if anyone could tell me if this is wrong design before …

Member Avatar for andydeans
0
286
Member Avatar for nathanpacker

Very simple code, I even echo the variables to make sure they are comming through: [PHP]<? include 'config.php'; $recordid = $_POST['recordid']; $im=$_POST['im']; $bm=$_POST['bm']; $peachtree=$_POST['peachtree']; $canapprove=$_POST['canapprove']; $cancomment=$_POST['cancomment']; $canclose=$_POST['canclose']; $administrator=$_POST['administrator']; echo $im; echo $bm; echo $peachtree; echo $canapprove; echo $cancommnet; echo $canclose; echo $administrator; echo "<p>"; $result = mysql_query("UPDATE employees SET im='$im', …

Member Avatar for vimalsaifudin
0
3K
Member Avatar for farooq124in

Hello all i am new to sql, iam having a requirement where i need to have a distinct value from the result lets say example, contacts table id name --- -------- 1 john 2 jason 3 mark address table id address conid -- ------ ----- 1 newlane1 1 2 newlane2 …

Member Avatar for farooq124in
0
172
Member Avatar for Pooja J.

Hello to all, I want to know the difference between SQL and MySQL. Also, please post links if anyone have links related to this question.

Member Avatar for prem2
-1
55
Member Avatar for bradolive

Hi, I have a PHP application that stores sales transactions into database tables, etc - and we have decided to use this as an online service - which makes it great for the client. They aren't computer literate and their computers mysteriously die and disappear. Having off-site data and no …

Member Avatar for bradolive
0
194
Member Avatar for Mici21

I was searching around but I could not find it: I'd like a tool(free or paid) that is able to manage multiple MySql servers from the same GUI. I know about a few thick-client apps that do this, but I need one that you can use it from internet(forget about …

Member Avatar for Mici21
0
116
Member Avatar for s_kanika

Hello, I've DOB field in my database with date datatype. Bt when I enter 1 March 1980 from front end it stores 29 Feb 1980 in database. Can anyone help me? Thanx a lot in advance.

Member Avatar for drjohn
0
61
Member Avatar for edy_sze

Hey Guys I'm gonna start on a eleave system for a business soon and I was wondering which language should I use to write it in ? Can someone give a few suggestions as I'll be using MySQL database and Apache but server side script is not yet decided. Personally …

Member Avatar for drjohn
0
95
Member Avatar for scorpio222

Hello everyone. I have a php webpage, where there are textforms, dropdown lists and stuff. There is Activity field in the database. Whatever activities that i do on the webpage, like modifying the text in the textbox, or changing a value for a dropdown list, these need to be automatically …

0
75
Member Avatar for logonchristy

mysql trigger if new row inserted into that tabe... php need to popup that values in php... can u please advise me...

0
87
Member Avatar for vvashishta

hi... actually me wish to have few differences between SQL Server 2005 & 2008, from interview point of view. As I have asked the same question most often. give me the basic difference as well as technical too. Thanks

0
57
Member Avatar for fabzster

Hi I have a query which i run to give me the monthly amount of money that needs to get loaded to our consultants cards. Our system has changed and I need to get the same data but differently The query needs to join three tables consultants,voucher,gift_cards. The only difficulty …

0
100
Member Avatar for sam023

is there any to export data from mysql to excelsheet through PHP.. Thanks in advance..!! :D

Member Avatar for prem2
0
104
Member Avatar for s_kanika

Hello' I'm using following code and getting mysqlerror Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs/..... Code is $query="SELECT ('$retfield') FROM ('$table') WHERE ('$givefield')=('$val')"; $res=mysql_query($query); if(mysql_num_rows($res) > 0){ } Upto my knowledge I'm using correct syntax bt I dnt where I'm going wrong. Can anyone help …

Member Avatar for s_kanika
0
93
Member Avatar for prem2

Hi to all, Example: CREATE TABLE test(name varchar(20) NOT NULL DEFAULT ''); In the above query varchar is described as NOT NULL.Then why we are inserting DEFAULT value as '' (null). Thanks in advance, Prem

Member Avatar for pritaeas
0
87
Member Avatar for anuraggupta16

I am trying to connect to Mysql from Jsp in Tomcat and I am getting Java.lang.NullPointer Exception. Please provide any help as soon as possible. I have set the web.xml and the server.xml properly. My web.xml contains: [code=xml]<description>MySQL Test App</description> <resource-ref> <description>DB Connection</description> <res-ref-name>jdbc/TestDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>[/code] server.xml I have …

Member Avatar for jwenting
0
158
Member Avatar for nikhita
Member Avatar for Excizted

Hi people. I'd like to use MySQL in my application - would be an easy way for me to store users. But then I'd have MySQL credentials in my app, visible for everyone with a HEX editor, I'd suppose? And even though that MySQL user will have low privileges, then …

Member Avatar for Excizted
0
163
Member Avatar for cwkeng09

Hi, When I register a member using my script, why one of the column have "Resource id #14"?? Below is the code: if($do->new_user($username, $encoded_password, $email, $alertpay, $referral, $country, $c, $referral2)) {mysql_query("INSERT INTO history (username,type,time,custom1,custom2,custom3,custom4,custom5) VALUES ('{$username}','joined',unix_timestamp(),'0','0','0','0','0')"); mysql_query("UPDATE users SET balance=balance+'0.20' WHERE username='{$referral}'")or die(mysql_error()); mysql_query("UPDATE stats SET users = users + …

Member Avatar for cwkeng09
0
247
Member Avatar for rukshilag

Im working on this searh field and i finally can search from the database using an entered name or national ID no, when i press the find button. But i dont know how to incorporate radio buttons to be submitted to execute a query. can someone help me . my …

Member Avatar for rukshilag
-1
2K
Member Avatar for fsmaniaka

Hello there I am a fairly new in MySQL/PHP/Javascript programming. I'm writing a web based gymnast profile management system for my final year project. Here's my problem. I have 5 MySQL InnoDB tables: [B]tests[/B], [B]testunits[/B], [B]points[/B], [B]testsgymnast[/B] and [B]gymnast[/B] I am able to retrieve a selected test which has particular …

Member Avatar for cwarn23
0
229
Member Avatar for achiman

Please is it possible to have two where statement in an sql query? for example: SELECT * FROM Persons WHERE FirstName='Peter' but I want another condition which will also pass the query like: SELECT * FROM Persons WHERE house='duplex' or car='Honda' Is the second query correct if not how do …

Member Avatar for drjohn
0
103
Member Avatar for MDanz

in a cell in mysql i have tree, car, bus, dog, apple, ocean, tire. now i'd like to query only the words beginning with the letter T. So it should echo tree and tire. this hasn't been successful; [code] <?php mysql_connect("localhost", "Master", "pword"); mysql_select_db("db"); $letter = "t"; $user =mysql_query("SELECT * …

Member Avatar for somedude3488
0
83
Member Avatar for nschessnerd

Hey, I have a script that caches the output from a query, but whenever the query is run my cpu usage jumps to like 25% the query (theres about 5 different queries similar to this) is [CODE=mysql ] select n.name, ifnull(c.kills_d,0)+ifnull(s.kills_d,0)+ifnull(r.kills_d,0)+ifnull(k.kills_d,0)+ifnull(o.kills_d,0) scores, c.online_d+s.online_d+r.online_d+k.online_d+o.online_d online_d from names n left join scores_ctf …

Member Avatar for pritaeas
0
110
Member Avatar for krish_kooll

how to obtain query execution time? i need for mysql query in java... does anyone know

Member Avatar for linzyxer
0
919
Member Avatar for cwarn23

Hi and I remember reading in a really old topic that somebody here was able to write a chatroom without using mysql or any other database system. Can somebody explain how this is possible with just javascript and ajax? What I want to do is to have a script that …

Member Avatar for cwarn23
0
156
Member Avatar for jonathanroy

Hi, I am looking for the best solution to my situation: - I have businesses listed in a MySQL table. - Each business can bid on up to 10 keywords (different prices for different keywords). A user inputs a keyword and then I must find a way to query my …

Member Avatar for hashinclude
0
141
Member Avatar for Exploded Fiber

Running a SQL query from the following code: [CODE] <php if(sizeof($_POST['addcandidate'])){ foreach($_POST['addcandidate'] as $id){ $name= mysql_query("SELECT LastName FROM candidate WHERE Candidate_ID= '$id'"); while($rowz= mysql_fetch_assoc($name)){ $candidatename= $rowz['LastName']; $alter= "ALTER TABLE '$votertable' ADD '$candidatename' int"; mysql_query($alter) or die(mysql_error()); } } } ?> [/CODE] I return Im getting: [COLOR="Red"]#1064 - You have an …

Member Avatar for Exploded Fiber
0
97
Member Avatar for Deey

Hello! i have a mysql problem - i need to execute a query which selects field from one table and joins another table which is determined by a field value in table 1. for example, table1 contains fields ID(primary int) and someotherfield(varchar). i need to join table2 or table3 depending …

Member Avatar for drjohn
0
105
Member Avatar for ismael ahm@d

in mysql i have a field named S_No which i placed on auto_increment. whenever i delete the second row from the database and next time when i m trying to add another row in database its starts from the 3rd incremental value and basically i don't want it, i wana …

Member Avatar for drjohn
0
88
Member Avatar for Kamboodle

Hey there, I'm having problems importing my sql file via phpmyadmin. It keeps throwing up the following error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'id`) ); CREATE TABLE `sessions`( …

Member Avatar for pritaeas
0
117
Member Avatar for azegurb

hi there i have table consist of 5 columns it looks like this [CODE]id title theme image category 1 PHP tutorial tutorial self 1.jpg PHP 2 Javascript tutor tutorial self js.jpg Javascript 3 PHP tutorial 2 tutorial self ad.jpg PHP[/CODE] category here is changed for ex: how i can count …

Member Avatar for xylude
0
104
Member Avatar for k2k

i am trying to connect to mysql database using java. I have done connecting to microsoft access before. and i modified my code to connect to mysql server locally. i think the problem is I don't really understand where my mysql database is. anybody may point out the problem would …

Member Avatar for masijade
0
717

The End.