10,932 Topics

Member Avatar for
Member Avatar for breakid

Hi I have 2 Tables: CREATE TABLE IF NOT EXISTS `questions` ( `question_id` int(11) NOT NULL AUTO_INCREMENT, `createddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updateddate` timestamp NULL DEFAULT NULL, `active_flag` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`question_id`), UNIQUE KEY `id_UNIQUE` (`question_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE `alarts` …

Member Avatar for ammonsutherland
0
261
Member Avatar for javedshaikm

I have a similar mysql database both onine and in offline, with a few common tables in them. How can I synchronize both the databases to make sure the 'similar tables' in offline & online databases have the same data. How can I do this with phpmyadmin.

Member Avatar for ammonsutherland
0
219
Member Avatar for Olyboy16
Member Avatar for nagar.gaurav

Please let me know the detailed procedure to install Apache, MySQL, PHP and PHPmyAdmin on my system which is windows 7. or post a link where the complete installation is given. I do not need to work on XAMPP or WAMP or such kind of other softwares. you can also …

Member Avatar for diafol
0
620
Member Avatar for jacob21

Hi, I am using below PHP script for insertion in mysql table from CSV file. Below code is working fine but i am trying to leave first row of CSV as it contains heading for data. need suggestions as it is reading from very first row. <?php //connect to the …

Member Avatar for leviathan185
0
2K
Member Avatar for asif49

try { mysql_query("INSERT xyz"); mysql_query("INSERT xyz"); mysql_query("INSERT xyz"); commit() } catch (Exception $e) { rollback() } I would like so that if any of the queries within the try { } fails, to go to the exception and rollback the transaction, and commit otherwise. What kind of things will it …

Member Avatar for LastMitch
0
903
Member Avatar for dancks

error: 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 '' at line 1 Its valid sql I checked I just don't understand what would cause that error. I also tried different statements and …

Member Avatar for radow
0
359
Member Avatar for romiaujla

Hi everyone, Here I have a php code, and i want to understand one part of it - like what is actually going on over there. (Based on Model View Controller(MVC) format) This is my 'model/category_db.php' - file It connects to the database and has some functions that have a …

Member Avatar for urtrivedi
0
206
Member Avatar for grantcharov

Okay, I am a total newbie stuck with the following task. I have one table, that looks like this: | id | name | rating | date | ------------------------------ What I am trying to do is gettin an output showing which 'name' has the best 'rating' based on months, showing …

Member Avatar for grantcharov
0
229
Member Avatar for pavitrakannan

# whenevr i execute ne "select *"for any database the error belo is shown,is there any setting in phpadmin....coz this problem occured 1 fine day.....pls help. # <html> <head></head> <body><html> <head> </head> <body> <?php $con = mysql_connect("localhost"); if (!$con){ die("Can not connect: " . mysql_error()); } mysql_select_db("snippets",$con); if(isset($_POST['update'])){ $UpdateQuery = …

Member Avatar for Will Gresham
0
135
Member Avatar for dancks

code: I am trying to debug the code, I can't understand why (or how) the same error is being thrown despite the if statements, dies, and different mysql_queries. I don't get it. <?php session_start(); $_SESSION['msg'] = ""; $con = mysql_connect('localhost','me','omglol'); if(!$con) { die("The connection to mysql server is not being …

Member Avatar for LastMitch
0
109
Member Avatar for PF2G

Hi, I'm developing an APP for android which requires a database, i'm using mySQL, but haven't had any luck with it's connection, this is my code: connection class: public class MySQLConnect extends Activity{ public void onCreate(Bundle savedInstanceState) { } public static void connection(String[] args ) throws Exception{ Class.forName("com.mysql.jdbc.Driver"); Connection con=(Connection) …

Member Avatar for peter_budo
0
458
Member Avatar for NinjaMediaD

I forgot the way to write a query where you can psuedo name a table, for instance I have a table named user but I have to access it twice in one query and I want the results to be different. something like select user(a).f_name, user(a).l_name, user(b).f_name, user(b).l_name from user(a), …

Member Avatar for NinjaMediaD
0
190
Member Avatar for saadi06

Hi, I have a question that can we use a mysql query in Concat clause. I want to make a query like this SELECT CONCAT(AVG(value),'-',(select Count(UserId) as counts from user_details )) as `Average` from surveyuseranswer Now I want to count number of users and concat it with the average value. …

Member Avatar for dcdruck
0
130
Member Avatar for Shodow

how to do this right Select DATE_FORMAT(EventDate, '%b %d, %Y') from details Order by STR_TO_DATE(EventDate, '%d-%m-%y') Oct 24, 2012 Oct 27, 2012 Oct 28, 2012 Oct 20, 2012 Dec 22, 2012 Jan 11, 2013 Jan 19, 2013 Nov 24, 2012 Dec 29, 2012

Member Avatar for dcdruck
0
142
Member Avatar for Shodow

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a1039476/public_html/getdetails.php on line 69 help <form action="getdetails.php" method="post"> Search Within: <select name="searchtype"> <option value="CustomerID">Customer ID</option> <option value="CustomerName">Customer Name</option> </select> Search Record: <input name="searchterm" type=”"text" size="20"/> <input type="submit" name="submit" value="Search"/> </form> <?PHP echo "<title> *********** </title>"; $searchtype=$_POST['searchtype']; $searchterm=trim($_POST['searchterm']); if …

Member Avatar for pritaeas
0
250
Member Avatar for mystycs

Below i made a MySQL Table in my phpmyadmin. [Click Here for a screenshot of my phpmyadmin table](http://i.stack.imgur.com/7gl77.jpg) I want to print on my php page the cat_name of a cat_id of my choosing. What code would i use exactly for that? I am looking at this guide here But …

Member Avatar for diafol
0
191
Member Avatar for Shodow

onload mysql 'query' will be executed then if the visitor will hit search the mysql 'querysearch' will be executed how to do that? <form action="default.php" method="post"> Search Within: <select name="searchtype"> <option value="CustomerID">Customer ID</option> <option value="CustomerName">Customer Name</option> </select> Search Record: <input name="searchterm" type=”"text" size="20"/> <input type="submit" name="submit" value="Search"/> </form> $searchtype=$_POST['searchtype']; $searchterm=trim($_POST['searchterm']); …

Member Avatar for LastMitch
0
214
Member Avatar for karlcunanan

Hello PHP geniuses! I am a beginner in php and would like to seek your expert advices and knowledge. When I display the result to a table, it always loop at the bottom, I want to display the another table at the right side of the first table. When I …

Member Avatar for LastMitch
0
203
Member Avatar for AndreRet

I need to add an image (saved path in mysql - image from file on server returned from $image_id) to my page according to 4 rows returned. There will always be 4 rows returned from db. My problem is that it shows the same image (main with 3 thumbnails) in …

Member Avatar for AndreRet
0
220
Member Avatar for havish999

I have a table attendance which contains id(int), attendance(char), and date(date datatype) columns. Values get stored in this table through a php file. In the below code I have given two textbox for the user to select date range. eg. from 2012-10-15 to 2012-10-17.. when the user selects date range …

Member Avatar for havish999
0
255
Member Avatar for Mikesmusings

Hi! I have a contact form that won't...do anything!! I'm kinda new at this, although I've been succseful on MS SQL for YEARS...Can some one shed light on this? Thanx in advance!: The HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> …

Member Avatar for Mikesmusings
0
374
Member Avatar for vestervang

I'm trying to make my first gallery with PHP and I'm having some problems i can't solve. My code looks like this: <?php include_once('config.php'); //Script der uploader og omdøber billeder if(isset($_FILES['billede'])){ $errors = array(); $allowed_ext = array('jpg','jpeg','gif','png', 'bmp'); $file_navn = $_FILES['billede']['name']; $file_ext = strtolower(end(explode('.', $file_navn))); $file_tmp = $_FILES['billede']['tmp_name']; $file_size = …

Member Avatar for vestervang
0
275
Member Avatar for rayidi

I want to store my array into my database using jQuery. Here is my code i'm using serialize(); function. Its storing correctly but when i unserialize(); nothing happening. Please help here is my code. <script> $(document).ready(function(){ $("#save-skills").click(function(){ var skills = $('input[name="skills[]"]').serialize(); console.log(skills); $('#loading').css('display', 'block'); var queryString = "skills=" + skills …

Member Avatar for diafol
0
213
Member Avatar for branding4you

Ok so now I am stuck, I looked at the http://www.daniweb.com/web-development/php/threads/326436/php-read-text-file-and-save-into-databse page and understand some of it, Yet it is not what i require, substring does not count like I thought it would, like the left, right mid commands in excel. I want to count to the data I want …

Member Avatar for branding4you
0
781
Member Avatar for mikeandike22

I have seen a couple solutions to this problem but none have worked so far. here is the error. [B]Fatal error[/B]: Call to undefined function mysql_connect() in [B]C:\wamp\www\login.php[/B] on line [B]12 [/B]and the code [PHP]<?php // connect to the mysql server $link = mysql_connect(localhost, root, admin) or die ("Could not …

Member Avatar for ashishanand
0
4K
Member Avatar for Yorkiebar14

Hello, I am making a website to do with different tests so I need a script which can unlock test 2 after test 1 is completed. Then the same for 3, then 4 etc etc. I tried using MySQL to increase an INT so I could tell what the latest …

Member Avatar for Yorkiebar14
1
303
Member Avatar for SaaDwTk

How do I do that using SQL queries? I need a code to do that: For every "Name" on "names" column on DataBase, do this: { name: 'NameX', data: [Value from name X] } I need a code to display in categories, all names that theres in the "names" column …

Member Avatar for pritaeas
0
75
Member Avatar for maki.tabasa

i have this main_login.php code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form name="form1" method="post" action="checklogin.php"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>Member Login </strong></td> </tr> <tr> <td …

Member Avatar for Will Gresham
0
258
Member Avatar for Arjun_Sarankulu

I have a crontab job in which data from csv file get insert into mysql table at regular interval. Now i want the same table data to be inserted in ms sqlserver database. I know i can write code again to take data from csv to ms sqlserver database. But …

Member Avatar for rayidi
0
145

The End.