10,946 Topics

Member Avatar for
Member Avatar for Izzah_1

i have created a page which has a table that enables user to delete a record via a delete button but somehow the queary isnt working. php coding <?php include("dbase.php"); $idURL = $_GET['id']; // Connect to database server mysql_connect("localhost", "root", "") or die (mysql_error ()); // Select database mysql_select_db("studiobooking") or …

Member Avatar for diafol
0
336
Member Avatar for Kewne

I have a query that starts like this... SELECT COUNT(A.FISH), COUNT(B.MEAT), COUNT(C.FRUIT).... now my problem is this, how could I count when I need to consider an expiration date for each column,...and the expiration dates varies for each column... Can I do this in one query? Or is there any …

Member Avatar for Kewne
0
248
Member Avatar for marifard

Dear friends on daniweb, First of all hope all of you are ok. I post this article to suggest me some ideas about the attachment of paypal in php. I wish to try a booking site for travelling(as a dummy at this stage). For this, php language is better than …

Member Avatar for marifard
0
376
Member Avatar for raidenx44

we have problem regarding to the list view portion as you can see on the figure. On the left list view, we have a list of authors which data bounded through the database. we want it to transfer several of the information on the right list view then get its …

Member Avatar for ryanjayson
0
164
Member Avatar for Danny_3

I have a database with a table, jobs and i have written this query to get information from this table. But i am getting no results with this data and i have no idea why? SELECT startDateTime, endDateTime FROM jobs WHERE startDateTime BETWEEN '19/11/2013' AND '20/11/2013' Database Structure: 1 jobId …

Member Avatar for Danny_3
0
180
Member Avatar for sigvewinter

I have the following code which I use in PHP-Liquid template engine. I want the ability to add or delete rows trough phpMyAdmin instead of adding/deleting new arryas. So I need to use MySQL, but how should I proceed to work it out with my example? $assigns = array( 'blog' …

Member Avatar for broj1
0
120
Member Avatar for rjony321

Hi Master, please help me, i could not insert my multiple checkbox selected value into my table. please see and help me. its insert only one value like first one. here is code: **HTML code: ** <td width="75%"> <input type="checkbox" name="whats_include[]" value="Breakfast" > Breakfast / <input type="checkbox" name="whats_include[]" value="Lunch" > …

Member Avatar for diafol
0
378
Member Avatar for João_5

Hello guys, i have been away in the last few days, because of work, so i am on again. I am trying to ping a series of hosts and then add info about the ping in a row. I have a DB called ad, with a table called ping with …

Member Avatar for João_5
0
391
Member Avatar for Eagle.Avik

hi how can i fetch data from the database and stroe it into session variable. my code: $sql = "SELECT password, fullname, username, active FROM ".$mysql_table." WHERE (username = :username OR email = :username) AND password = :password"; $statement = $pdo->prepare($sql); $statement->bindValue(':username', $_POST['username']); $statement->bindValue(':password', md5($_POST['password'])); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); if …

Member Avatar for Eagle.Avik
0
272
Member Avatar for bejing.shin
Member Avatar for sagisgirl

Hi guys, I have a table called "goodsbalance" qtyBalanceID | k8goodsID | goodsIn | goodsOut | qtyBalance ---------------------------------------------------------------------------- Can I do some calculation like this? $query_recgoodsbalance = "SELECT * FROM goodsbalance"; $rs_recgoodsbalance = mysql_query($query_recgoodsbalance); $rec_goodsbalance = mysql_num_rows($rs_recgoodsbalance); while (($reck9goodsout = mysql_fetch_array($rs_recgoodsbalance) )!= false) { $query_UgoodsOut = $rec_goodsbalance['goodsOut'] - $_POST['k9goodsQty']; $rs_UgoodsOut …

Member Avatar for sagisgirl
0
147
Member Avatar for venkyb47

We have ERP application that store the data to ORACLE database and also we have a lot of another web applications that use the ERP database. We got the performance issues when ERP and another application use the same database. We are planning to do mirroring of oracle database into …

Member Avatar for venkyb47
0
602
Member Avatar for janjini.10

Is it required to use index when the MySQL table has only 100 rows? Justify your answer.

Member Avatar for cereal
0
206
Member Avatar for lacxs143
Member Avatar for RomelynCastillo
0
68
Member Avatar for Loi-se

I have a question about how to set up a faceted search function in PHP and SQL. I wonder how the result set should be filtered based on the selected facet values. For example if I have a facet menu with 5 filter options how should I filter the results. …

Member Avatar for diafol
0
83
Member Avatar for erminasrcutp

this is my search.php , however once user has view one data user will want to update one location / status . I can not do the Edit.php . Can someone please help me ? Search.php <html> <head> <title>::Home</title> </head> <body> <div id="header"> <img src='banner.png' align='middle' width='101%' height='110%'> </div> <div …

Member Avatar for rpv_sen
0
253
Member Avatar for samuel terngu

I have created a table in mysql database table(tblmysq) with id(autoincrement),name(string),branch(string),sex(string),and dat(datetime).The following error occurs when i try to insert a record:check the manual that corresponds to your mysql server version for the right syntax near line 1. My lines of code are : Try conn = New MySqlConnection(conStr) conn.Open() …

Member Avatar for samuel terngu
0
354
Member Avatar for nadiam

So im not too sure if im posting this in the right forum. please dont be angry! new at daniweb so basically what i wanna know is how to save real time date into database. what i have is a page with tabs of month and in each tab the …

Member Avatar for JorgeM
0
1K
Member Avatar for pce369

So I have the following MySQL query, which works fine: select year(created_at) as year, month(created_at) as month, day(created_at) as day, item_sdb_id, price_per_unit from (select l.item_sdb_id, l.list_price / l.quantity as price_per_unit, l.created_at from listings as l inner join purchases as p on l.purchase_id = p.id where l.item_sdb_id in (12345) and p.created_at …

Member Avatar for urtrivedi
0
337
Member Avatar for davidjennings

Hi all, I am trying output the following 1 user after validating data from a database and I have no output to the screen. I am not sure what is missing from query? Any help would be appreciated Thanks in advance David ------- Index.php ------ <?php session_start(); ob_start(); include_once ("includes/settings.php"); …

Member Avatar for davidjennings
0
263
Member Avatar for Ismatus3

Hello, When i try to insert some datas with python to MySQL database where the fourth column is a variable , (it depends on the variable "e0") , i get a message error here is the query syntax : `cur.execute('insert into suiviactuelms (modelsa,date,heure,%s) values (%s,%s,%s,%s);',(e0, modelidvar, cur_date, t, quantitevar))` and …

Member Avatar for woooee
0
583
Member Avatar for Eagle.Avik

hi, can anyone point out why is this script not working?? it does not inserting data into mysql.. here is the script: if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['form_name'] == 'signupform') { $newpassword = $_POST['password']; $confirmpassword = $_POST['confirmpassword']; $code = 'NA'; $active = '1'; if ($newpassword != $confirmpassword) { $error_message = …

Member Avatar for brandon66
0
354
Member Avatar for daniel.conlinjr.1

Is there a program for mac that i can use to connect to my mysql Database instead of opening Fire fox and going in and logging in??

Member Avatar for CimmerianX
0
192
Member Avatar for vipula

I am trying display a link from my mysql database. I cannot get it done, It shows like this, for example **www.mywebsite.com/www.google.com** How can I get rid of my website url from this. this is my actual code in display.php <tr> <td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="top"><b>Full Text Link :</b></td> <td align="left" valign="top"><?php …

Member Avatar for niranga
0
185
Member Avatar for joshmac

I am trying to copy data from one database table to another. Below is the MySQL syntax I am working with: $array = []; $q1 = DB::inst()->select( "stu_term" ); foreach($q1 as $r1) { $array[] = $r1; } $bind = [ ":stuID" => $r1['stuID'],"termID" => $r1['termID'],":level" => $r1['level'] ]; $q3 = …

Member Avatar for joshmac
0
209
Member Avatar for Indians

I am using datepicker in my form for booking date field. when i pick a date it shown like this 11/13/2013 (MM/DD/YYYY). In mysql database i am using datetime Type. in mysql db always shows 0000-00-00 00:00:00. i want to change the date format. for example if i am choose …

Member Avatar for diafol
0
629
Member Avatar for karen.frias0316

Hi I have a code that's been working for me when my server is Cpanel. but due to ceratin issues i need to transfer to godaddy. i'm using this code before. but now it's not working. i have run a test connection and im sure i have a connection to …

Member Avatar for diafol
0
1K
Member Avatar for davidjennings

Hi all, I am working on the following code. In the SQL query, I am currently calling all the data from the DB using * and all works fine. I would like to be selective and call the coloumns required i.e UserID, UserFullName, UserEmail, UserLastPassword, but when I do this …

Member Avatar for davidjennings
0
367
Member Avatar for Manuz

[CODE] SELECT count(*) FROM information_schema.`COLUMNS` C WHERE table_name = 'your_table_name' AND TABLE_SCHEMA = "your_db_name" [/CODE] TABLE_SCHEMA is required only if table name exists in more than one db

Member Avatar for Terry_2
0
300
Member Avatar for rony001

I have the following sql query in vb.net and ms access , how do I create a table from the query result ? `SELECT 'Table1' AS [Table], SUM(a) - SUM(b) AS Result FROM table1 union all union all SELECT 'Table2' AS [Table], SUM(a) - SUM(b) AS Result FROM table2 I …

Member Avatar for diafol
0
193
Member Avatar for tqmd1

Dear Sir, HTML file has following codes <!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=iso-8859-1" /> <title>Connection Checking</title> </head> <body> <center> <h1>Connection Checker</h1> <fieldset style=width:300px;background-color:#E0FFFF> <legend sytle=font-size:12;>Click Connect</legend> <form name="form1" action="connect.php" method="post"> <table> <tr><td></td><td align="center"><input type="submit" name="button1" value="Connect"> </td></tr> </table> </form> </fieldset> </center> …

Member Avatar for Bachu
0
162
Member Avatar for accra

i have this ajax script <script type="text/javascript"> var url = "GetAutoData.php?svreg="; // The server-side script function handleHttpResponse() { if (http.readyState == 4) { if(http.status==200) { var results=http.responseText; document.getElementById('divAutoInfo').innerHTML = results; } } } function requestAutoInfo() { var svreg = document.getElementById("getautomobile").value; http.open("GET", url + escape(svreg), true); http.onreadystatechange = handleHttpResponse; http.send(null); } …

Member Avatar for gabrielcastillo
0
227
Member Avatar for theresel

I have a search script that searches my database for a particular property address, but I have a problem displaying all the records ... my script is displaying only one record no matter how many records exist in the database with the same property address. I have two tables in …

Member Avatar for LastMitch
0
181
Member Avatar for dalilice

Hello, I have a little problem. This is what I want to achive: I have 2 mysql tables (categories, channels), the channel table has a cat_id in it. I want to update/edit a product and place it in another category but the code that I've made shows just one catedory …

Member Avatar for LastMitch
0
383
Member Avatar for Fiorentino01^

Hi hope somebody can help me. I was changing around some tables in a DB that was working fine.I don't know what I did but I deleted a table and wanted to recreate it a little different.Now I cannot do it, I get a message that the table already exists.So …

Member Avatar for LastMitch
0
98
Member Avatar for raidenx44

I'm working on my capstone project. I really having a bad time thinking for the correct query for the search button function. VB.Net 2008 is my front end while I'm using MySQL as my back end database. Private Sub BtnSearch_Material_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSearch_Material.Click Try …

Member Avatar for raidenx44
0
313
Member Avatar for cereal

Hello, so I was trying few relations between tables and I noted an unexpected behaviour when using `group_concat()`. Let say I have three tables: fruits, fruitstock and fruitprices. These are the structures: create table fruits ( id tinyint unsigned not null auto_increment primary key, name varchar(50) not null, quality varchar(50) …

Member Avatar for cereal
1
4K
Member Avatar for patk570

Hello everyone, I have a table that i want to limit to 10 results per page and have a simple pagination script to generate the next 10 results. I have tried many different options, but alas it does not work. here is what I have so far. <tbody> <? //specify …

Member Avatar for patk570
0
176
Member Avatar for HunainHafeez

ALTER FUNCTION [dbo].[customers_udfMin2] ( @decission tinyint ) RETURNS int AS BEGIN -- Declare the return variable here DECLARE @min int Declare @default int = 10 -- Add the T-SQL statements to compute the return value here if (@decission = 1) Begin SELECT @min = MIN(customers.cus_id) from customers End else RETURN …

Member Avatar for HunainHafeez
0
494
Member Avatar for João_5

Ok, new question... I need to get data from one mysql row, set it as $ad The following code will convert it to readable date format. <?php function adConvert ($ad) { $seconds_ad = $ad / (10000000); //86400 -- seconds in 1 day $unix = ((1970-1601) * 365 - 3 + …

Member Avatar for João_5
0
309
Member Avatar for narasimha9

display city_name using two tables. I have written two queries but unable to display the results. First Table name is tbl_city and it has id,state_id,city_id,city_name. Other table name is tbl_states and it has id,state_id,state_name $state_id=$_REQUEST['state_id']; $query="select c.city_name FROM tbl_city AS c,tbl_states AS s where c.state_id='$state_id' AND s.state_id='$state_id'";(two tables using alias) …

Member Avatar for Reverend Jim
0
231
Member Avatar for iv_jo

I need to get the name of the table with the biggest number of rows, I can find the biggest number of rows with function count and than function max, but i don't know how to see from which table is that maximum, can anyone help? tnx

Member Avatar for Tpojka
0
280
Member Avatar for davy_yg

What's the difference between char and varchar in phpmyadmin ? I am trying to decide whether to use char or varchar for name for example.

Member Avatar for RomelynCastillo
0
273
Member Avatar for leoxhin
Member Avatar for shaman:D
Member Avatar for shaman:D
Member Avatar for Benjamin_4

Honestly am writing an application and am stuck at this point. problem is am writing an asset derpreciation application and i am calculating for Monthly Depreciation,End-of-year value ,Accumulated depreciatio.I want get the results of the values in this form in my jTable when the calculation is done. for example when …

Member Avatar for mKorbel
0
208
Member Avatar for João_5

Hello guys, my turn to ask a very simple question. I already have a Mysql DB with querys working great. I import data from Active Directory server, and one of the values is State, enabled or disabled, etc. But this values came in a form of code: 512 = Enabled …

Member Avatar for diafol
0
290
Member Avatar for palo.moshoeshoe

this is my php code,it works properly before inserting,can it be the fact that i have attatched a photo to my form? the other problem is,i dont know what type is photo for my xampp database,i left it a VARCHAR, the error i get is: Parse error: syntax error, unexpected …

Member Avatar for João_5
0
503
Member Avatar for Michael_18

I'm trying to display some records which meet some certain criteria. That works fine, but I also want to retrieve the total amount of orders. These are all located in the field 'Amount' from the Orders table. So if record 1 has got '22' in it's amount field, and record …

Member Avatar for balaji9124
0
318

The End.