10,945 Topics

Member Avatar for
Member Avatar for cmps

Hey all, I would like to know why when having big data in mysql table, executing a query for the first time takes 0.1.. sec, but if executing again the same query later, it will take only 0.0006 sec ? Exemple: SELECT name FROM `users` where id > 310000 limit …

Member Avatar for cereal
0
230
Member Avatar for Izzah_1

i want to ask is my coding correct or not.. ive been trying for many times and cant find the errors. thanks in advance if you guys help me with this problem. <!-- ubah.php --> <!-- Interface of update data. --> <?php include("db.php"); $idURL = $_GET['id']; $query = "SELECT * …

Member Avatar for Lsmjudoka
0
213
Member Avatar for Iikeloa

Hi I'm working on a website and every thing is going great untill I faced this problem with the editing page! here is my code : <?php session_start(); if(!isset($_SESSION['admin'])){ echo "Only admin has access to this page"; header("Refresh: 3;url=login.php"); }else{ require("inc/config.php"); require("inc/header.php"); $id = (int)mysql_real_escape_string($_GET['id']); $title = $_GET['title']; $describtion = …

Member Avatar for Iikeloa
0
124
Member Avatar for Indians

<form action="searchdetail.php" method="post"> SEARCH BY: <select name="searchby"> <option value="gname">Guest Name</option> <option value="city">Guest City</option> </select> <input name="query" type="text" /> <input name="subval" type="submit" value="Search" /> </form> and searchdetail.php include("config.php"); if(isset($_POST['subval'])) { $query = mysql_real_escape_string(trim($_POST['query'])); $sql = mysql_query ("SELECT * FROM voucher WHERE gname = '$query'"); echo "<table border=1 width=860 align=center cellsapcing=5 cellpadding=5>"; …

Member Avatar for Indians
0
291
Member Avatar for rahia307

Hi every one, I am using this funtion function get_last_inserted_id($table) { include "dbsetting/adm_vars_config.php"; include "dbsetting/classdbconection.php"; $dbacosis = new dbacosis(); $sqlacosis = $dbacosis->queryacosis("SELECT LAST_INSERT_ID() AS `last_id` FROM `pcosis_courses`;"); if(!$sqlacosis or mysql_num_rows($sqlacosis) == 0) { return false; } else { $data = mysql_fetch_array($sqlacosis); return $data['last_id']; } } $id = get_last_inserted_id("courses"); echo $id; …

Member Avatar for diafol
0
120
Member Avatar for bodylove121

<?php $input = $_GET['input'];//Note to self $input in the name of the search $terms = explode(" ", $input); $query = "SELECT * FROM `#####` WHERE 1 LIMIT 0 , 30"; foreach ($terms as $each){ $i++; if ($i == 1) $query .= "keywords LIKE '%$each%' "; else $query .= "OR keywords …

Member Avatar for pardeepkk
0
315
Member Avatar for Indians

here i am store the dynamic row values into mysql. i am using jquery and javascript for dynamic rows and auto calculation and then stored to mysql using php coding. that works perfectly. i already added dynamic row value into mysql perfectly. But, now i want to edit the table …

Member Avatar for Indians
0
1K
Member Avatar for Izzah_1

i want to insert new data but the data didnt show up in database and didnt display for user when i click foe change theres nothing happend i couldnt find any error...ples help me (BookingnDisplay.php) <h1><?php if($_SESSION["name"]) { ?> Welcome <?php echo $_SESSION["name"]; ?>. Click here to <a href="logout.php" tite="Logout">Logout</a>. …

Member Avatar for ehpratah
0
214
Member Avatar for jaejoong

Hi All, I have a problem with my Microsoft SQL Server. When I execute my queries, it did not appear. The screen says, "Save Result as". I already unchecked the "Prevent saving from changes...." from >>Tools>>Options>>Designers>>Tables and Database Designers but it keeps in appearing. Please help! Thanks in advance :)

Member Avatar for jaejoong
0
106
Member Avatar for yagelnnn1

Hey, does anybody know how to read cloumn from MySQL? I mean, like if I have in my MySQL the schema "Bdatabase" and the table "accounts". In that table there are username and password. How can I do in my program that it'll read the username and password?

Member Avatar for ryanjayson
0
193
Member Avatar for Gen_1

I need help playing audio from mysql blob. I know how to save audio file as blob but I don't know how to play it in vb.net. Is there a way to play audio from mysql blob without saving it first as a file? If so, I need sample codes, …

Member Avatar for Begginnerdev
0
339
Member Avatar for nadiam

Hey guys, yes my problem is very, very trivial and im sure it does not rank importance to be posted but im really frustrated. See my coding was fine as in it executed as i wanted it to and now i dont know why but it isn't and i have …

Member Avatar for diafol
0
299
Member Avatar for Nazirah_1

I have some problem about uploading and database. I upload the file (abc.jpg) and the file already insert to the folder name (uploads). But when I check in database (php), the file did not enter. Here is my code. Hope anyone can help me.Thank you. <? include "conn.php";?> <?php error_reporting(0); …

Member Avatar for pritaeas
0
259
Member Avatar for zeeshan_kust

i have retrieved mysql data from one table in json using the following script [CODE]$table_first = 'abc'; $query = "SELECT * FROM $table_first"; $resouter = mysql_query($query, $conn); $set = array(); $total_records = mysql_numrows($resouter); if($total_records >= 1){ while ($link = mysql_fetch_array($resouter, MYSQL_ASSOC)){ $set[] = $link; } } echo json_encode($set);[/CODE] how can …

Member Avatar for anson davis
0
691
Member Avatar for Kewne

I have a query that used union all.. and produces a table like this: `+-------------+------------------------+-----------+--------------+ | Type | Name | IDNum | Warnings | +-------------+------------------------+-----------+--------------+ | M | sample | 2013-1 | 4 | | L | sample | 2013-1 | 2 | +-------------+------------------------+-----------+--------------+` now i made a while loop …

Member Avatar for pritaeas
0
1K
Member Avatar for Indians

edit.php coding... <?php $uid = (int)$_GET['id']; ?> <form action="update.php" name="myform" method="post" onsubmit="return(validateform());"> <input type="hidden" name="edited" value="<?=$uid;?>"> <?php $tariff_query = mysql_query("SELECT * FROM ebvouchertariffs WHERE VoucherID_Fk = $uid"); if(mysql_num_rows($tariff_query)>=1) { echo "<table width=960 align=center cellspacing=0 cellpadding=0> <tr> <td width=68 height=50 class=tabtext>SL.NO</td> <td width=106 class=tabtext>DATE</td> <td width=204 class=tabtext>PARTICULARS</td> <td width=117 class=tabtext>NO OF …

Member Avatar for Iikeloa
0
377
Member Avatar for dezzpro

i wish to capture user input regarding workhistory on one form - how do I catch the same infor structure, ie. company name, position, duration, job description, for 3-4 companies, dynamically in PHP and write it to mySQL. I need direction on how to do this re...form structure and table …

Member Avatar for diafol
0
176
Member Avatar for iv_jo

Hi! I have in my database few tables and each table have a column with dates of inserting records. I don't know how to go through the database, through all tables, in chronological order, from the first inserted record until the last, can anyone help? tnx!

Member Avatar for JorgeM
0
305
Member Avatar for Benjamin_4

i want to populate my jtable with selected items in my jcombobox below is the code i wrote to perform the action but it does not. please am still new in java so i will appreciation the help. if(AssetCategories.getSelectedItem() == "LAND & BUILDINGS"){ try { String sql = "SELECT Description …

Member Avatar for mKorbel
0
206
Member Avatar for sk8ergirl

I have two table company table , product table and customer table compnay table have C_id as PK , FK P_ID of product product table have P_ID as PK and cust_ID FK of customer customer table have CUST_ID as pk and P_ID as fk I want to add data to …

Member Avatar for pritaeas
0
134
Member Avatar for Andrew_7

Hey guys, So, as the title says, trying to join four tables. The purpose of the script is to: 1. Get the username of members being "followed" from table called following 2. Find the status updates of members in step one from table called status 3. Retrieve all comments on …

Member Avatar for diafol
0
181
Member Avatar for Benjamin_4

below's code is a code i wrote to get the value of 'monthly Depreciation' when i select the row on my jTable by either mouse-clicked or key-pressed. but it only selects the first value for 'monthly depreciation' when i click on the rows or key-press.the problem i know is coming …

Member Avatar for mKorbel
0
281
Member Avatar for iv_jo

Hi! Can anyone know the result of this query: SELECT COALESCE(MAX(ID),0) + 1 FROM Table123

Member Avatar for pritaeas
0
220
Member Avatar for kelley82879

I have a searchable database.. I would like to change the style of how the table is displayed... I have a css file of how I would like the table displayed.. Can that be done? If so..How?

Member Avatar for kelley82879
0
299
Member Avatar for Indians

<?php include("config.php"); if (isset($_POST['submit_val'])) { $cmeal = mysql_real_escape_string($_POST['meal']); $meal = "INSERT INTO ebmealplans( MealPlanName, CreatedOn ) VALUES ( '{$cmeal}', NOW() )"; if(!mysql_query($meal, $link)) { die("Error : " .mysql_error()); } $croom = mysql_real_escape_string($_POST['room']); $ref_key = mysql_insert_id(); $room = "INSERT INTO ebroomtypes( RoomTypeName, CreatedOn ) VALUES ( '{$croom}', NOW() )"; if(!mysql_query($room, $link)) …

Member Avatar for diafol
0
8K
Member Avatar for Indians

index.php coding <td><input type="text" name="slno[]" value="" size="2"></td> <td><input type="text" size="10" name="date[]" id="SelectedDate" onClick="GetDate(this);" readonly="readonly"/></td> <td><input size="24" type="text" name="particulars[]" value="" placeholder="Description"></td> <td><select name="noofnights[]" value="0"> <option value="empty"></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option …

Member Avatar for Lsmjudoka
0
6K
Member Avatar for nadiam

hey guys, so im trying to display data from my database into a table but i got this error : Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\CashFlow\balance_report.php on line 45 code: <?php require "connect.php"; if($_SESSION['name']) { $name = $_SESSION['name']; $query=("SELECT * FROM asset WHERE name …

Member Avatar for nadiam
0
216
Member Avatar for Ken1234

i have a problem in choosing data type for this column in SQL..can anybody help me??? result (tournament_id*, player_id*, round) i've done the first 2 columns, i'm confused about the data type of round=='...i wondered if it was cstring or text or numeric here's my code : tournament_id int, player_id …

Member Avatar for ugi.nagesh
0
270
Member Avatar for annyangel

i have a database (hello) and it has 2 tables 1. login_tbl and 2. users_tbl both contains the 3 fields id,username,password and id,first_name,last_name respectively. now plz help me to write the php code according to this which helps to search the users details in users_tbl and fetch all the records. …

Member Avatar for annyangel
0
169
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

The End.