10,940 Topics
| |
I have the following PHP code [CODE]<?php // SimpleHTMLDom Library require_once('simple_html_dom.php'); // Source Data $source = 'table-array-data.htm'; // Displays Extra Debug Info $dbg = 1; // Read DOM $html = file_get_html('http://www.ercot.com/content/cdr/html/real_time_system_conditions'); // get the table. Maybe there's just one, in which case just 'table' will do //$table = $html->find('#theTable'); // … | |
With the code below I have the plant information printing out first and then all of the availability printing out last. Is there any way I can get both printing together, but not have duplicate pictures and information for the numerous sizes that sometimes list per plant. Ex. Buxus Green … | |
Hi, I'm fairly new to php and sql, and was wondering if this question could be easily answered, I'll do my best to be as concise as possible; I have a table within a database that I'm using to return basic searches for my company to find specific products, i.e … | |
I have built a site completely off of tutorials. aonentertainment.com in the pursuit of learning and profit to pay for classes. I want to add (Next,1,2,3,Previous) so I do not have to manually create new pages. I searched DaniWeb.com and found >> [URL="http://www.daniweb.com/web-development/php/threads/1720"]Clean Previous Next Script for MySQL[/URL]. Link to … | |
I am making a project for my client who needs a system that has to have a user interface (an Asp website) and a Manager interface (a C# app). the twist is that no matter how many new users sign up or edit their account via website or the manager … | |
hello i want to seprate values display by my while loop.The result is 200,900. i want to slpit as 200 and 900. i used the explode function but only return the value on exmple[1] index not on zero but i want to get the value '200' also is there any … | |
Hi, Having some trouble getting it all together. I have a table in which i need to get Distinct names based on latest date. This is what the table looks like; Table Scores; [CODE] --------------------------------------------------------------------- | Name | Date | High Score | Medium Score | Low Score | --------------------------------------------------------------------- … | |
i am looking for some advice on what is the best approach to get this done :) my datababase holds a table categories with the columns [CODE]|category_id|category_name|category_parent_id|[/CODE] i am showing my users a html sortable table with the following columns |category_id|category_name|category_parent_name| so what i want, is to do a ORDERBY … | |
This is for a website search function, I do the following to get several similar results from the mysql database: [CODE] $var = "words words words"; $str = explode(' ', $var); foreach ($str as $i) { $match[] = " e LIKE '%$i%' ";//to search each word within searched phrase separately … | |
There are two table from which i want to get value 1. heads 2. subheads The field names in heads table is: id, head_name the field name in subheads table is: id,subhead_name. i want to get value from these two table when the value mean id is '1' i wrote … | |
Need help to [B]update 2 rows in the same table[/B], been searching & testing with no real luck. I need to update 2 rows based on the URL below... [ICODE]id=145&contactuname=json101&contactid=7&memberid=1&confirm=2[/ICODE] Updating these fields: [ICODE]ustatus, memberid, contactid, contactuname[/ICODE] Table structure: [CODE]CREATE TABLE `contacts` ( `id` INT(40) NOT NULL AUTO_INCREMENT, `ustatus` TINYINT(1) … | |
Hi, i am trying to make this work but i guess i am missing something..... This is what i have: "db.php" [CODE] <?php DEFINE('DATABASE_USER', 'root'); DEFINE('DATABASE_PASSWORD', '123456'); DEFINE('DATABASE_HOST', 'localhost'); DEFINE('DATABASE_NAME', 'livesearch'); $mysqli = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD, DATABASE_NAME); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } else { //connected … | |
[CODE]<?php $con = mysql_connect("bangla123.db.8390659.hostedresource.com","bangla123","Algnab123%"); if (!$con) { die('Could not connect: ' . mysql_error()); } if (mysql_query("CREATE DATABASE tryDB",$con)) { echo "Database created"; } else { echo "Error creating database: " . mysql_error(); } mysql_close($con); ?> [/CODE] ------------ When I run the code, i get error -"Error creating database:.... Pls advise. … | |
[B]I am a newbie so please be kind.[/B] I have put together a form using multiple queries which pulls information from MySQL tables that are joined by ID number. It displays the info in a form so updates can be made. I cannot get it to update more than one … | |
Dear All, I have data coming into my db at quite a high frequency. Once I recieve the data I have many different db operation (select, update)checking and one final insert. Before inserting I will check it exist before or not? The problem at times the similar data comes apart … | |
Hello, I need help to write a perl script for read a data from Mysql Database using mysql query and write it into excel sheet.. Can you help me....? | |
So I have Microsoft SQL Server 2008 R2 installed and an instance set up with a database an user setup on that database with a password. I have installed PHP, and IIS and got PH working from the WWWROOT folder, but when tryng to connect to my database it is … | |
Hello, I've been trying to code a TrueSkill calculator using Java that fetches scores and updates them in a MySQL database. I finished coding it however it appears to have a problem while executing. This is an example of what I want the output to be like: [QUOTE]connecting to database … | |
Hello every1, i need some help.. I have a table member with atributes: no int primary key, name varchar(255) [CODE]create procedure insert_table3(in last int,in name varchar(255)) begin set autocommit=0; set @x=0; lock table member as m1 write; start transaction; repeat insert into member values(@x+1,name); set @x=@x+1; until @x > last … | |
I searched daniweb, google, etc. All had multible code snippets but I couldnt get any to work.. Well my database is "wallet" and in the row is "id" and "amount" So I tried like [CODE]$result = mysql_query("SELECT amount FROM wallet WHERE id LIKE '%$id%'"); while ($row = mysql_fetch_assoc($result)) { $money … | |
Hey Lets say I have 2 columns in table1 Id Value Id is obviously primary but I want Value to be unique.... I tried "NOT EXISTS" with a subquery but I cant really seem to get it to work. It would be something like [CODE]INSERT INTO table1(value) WHERE VALUES('3'); [/CODE] … | |
I'll should select first records from table one, where's id column included. And I'll should select all records from table two, where parent_id column matches table one record id value. Ofcourse could make with two separated searches, when printing table one info, but would be nice to handle all with … | |
Grettings everyone, im trying to create a stored procedure but it gives me the following error: 1339 Case not found for CASE statement Here is the code: [CODE]BEGIN #Routine body goes here... CASE @olds WHEN 'emp' THEN CASE @news WHEN 'loc' THEN UPDATE equipos SET pe=pe-1,pg=pg+1 WHERE id=@eqloc; UPDATE equipos … | |
Hi all, I'm decoding a JSON object into an array and then inserting it into a database, which informs markers on a google map. That step is working fine, but I'm now trying to insert code to (a) read whether the latitude value in the array is null, (b) send … | |
Hello every1, I want to ENTER Sr.No. and Name in the table using procedures. My table has attributes 1. Sr.No. (which is my primary key(int datatype)) 2. Name (which is not null(string datatype)) I want to write a procedure in mysql to automate the process of entering data in the … | |
I have two tables. tbl_clients and tbl_projects. They both contain auto incremented primary key columns. For adding new projects to tbl_projects, I use tbl_clients' clientname field to populate a dropdown menu on the new projects html form. The user chooses a client name from the menu, and the primary key … | |
Hi i'm trying to successfully get this PHP code to search MySQL database called test2 that has a table called questions, in that table there are columns called ID, Question, Category and Answer. This code is an excerpt from a tutorial that allows you to search the mysql database for … | |
Hi, Someone pls correct the error. [CODE]SELECT orderid, merchant, buyprice, commission, refund, (buyprice - refund) as expenseOrder , (commission - expenseOrder ) as profitt FROM business WHERE merchant LIKE "GO%"[/CODE] error: MySQL said: Documentation #1054 - Unknown column 'expenseOrder' in 'field list' Thanks. | |
I'm pull gaming stats from a database, but I'm having issues with one of the cases and I can't seem to figure out why. The first two cases work fine, but the last one just returns null. What's strange is when I replace the third case with one of the … | |
Hi experts, im new to coding and i really need help for this. i have done a shopping cart calculation using javascript my question now is, HOW TO SEND JAVASCRIPT VALUE INTO DATABASE (MYSQL) ?? [CODE] <?php require_once 'library/config.php'; require_once 'library/cart-functions.php'; $action = (isset($_GET['action']) && $_GET['action'] != '') ? $_GET['action'] … |
The End.