Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
mysqli_num_rows
- Page 1
OpenAI o3 vs Anthropic Claude 4 for Text Classification & Summarization
Programming
Computer Science
5 Days Ago
by usmanmalik57
[OpenAI](https://openai.com/) and [Anthropic](https://www.anthropic.com/) are two AI giants delivering state-of-the-art large language models for various tasks. In a [previous article](https://www.daniweb.com/programming/computer-science/tutorials/542132/comparing-gpt-4o-vs-claude-3-5-sonnet-for-zero-shot-text-classification), I compared OpenAI GPT…
Evaluating OpenAI GPT 4.1 for Text Summarization and Classification Tasks
Programming
Computer Science
2 Months Ago
by usmanmalik57
On April 14, 2025, OpenAI released [GPT-4.1](https://openai.com/index/gpt-4-1/) — a model touted as the new state-of-the-art, outperforming GPT-4o on all major benchmarks. As always, I like to evaluate new LLMs on simple tasks like text classification and summarization to see how they compare with current leading models. In this article, I will…
Re: Optimizing working with big data
Programming
Software Development
2 Months Ago
by Dani
> What is large? Are we in the TB range or mere handfuls of GB? For the sake of argument, let's use my use case and say dozens of gigs and millions of rows. > How often do you need to do this? Is it once a day, once a month, or just once. For me, the most important is real-time read and write performance to tables with millions of …
Re: The Impact of User Research on UX Design
Digital Media
UI / UX Design
2 Months Ago
by john_111
I once visited a website where there were 20 rows, each composed of 20 identical small white squares (about the size of this --> HH ), with a tiny arrow in the bottom quarter corner to indicate they were links. But no text anywhere. Can you imagine how hard it would be to remember which button took you to which page, several days later? This…
Re: Question/Answering over SQL Data Using LangGraph Framework
Programming
Computer Science
2 Months Ago
by Pelorus_1
Through its combination of natural language processing and structured query generation, LangGraph makes interfacing with databases and extracting insights over SQL data easier than ever.
Re: mysqli query for no results again
Programming
Web Development
12 Years Ago
by phorce
This code: if($SM_pro){ Basically is saying if SM_pro == true, however, DM_pro is an array, so, therefore it won't return true/false. You could try: if($SM_pro <= 0) { Alternatively, you could use the mysqi_num_rows() function.. http://www.nusphere.com/kb/phpmanual/function.mysqli-num-rows.htm Hope this helps :)
Re: MySQLi Help
Programming
Web Development
13 Years Ago
by pritaeas
See the [URL="http://php.net/manual/en/mysqli-stmt.num-rows.php"]manual[/URL] page. The num_rows function can only be used after store_results. See the example in the manual for the fix.
Re: Num Rows Problem
Programming
Web Development
12 Years Ago
by Atli
A better approach would be to use the SQL `COUNT()` function to have the SQL server return the number of rows, rather than return the rows and count them in PHP. It's less wasteful. $sql = "SELECT COUNT(*) FROM `users` WHERE fname = %s"; $sql = sprintf($sql, mysql_real_escape_string($_POST["email"])); $…
Paging issue in php for few corrupt rows excluded
Programming
Software Development
15 Years Ago
by multicoder
Hi, I have a strange situation to tackle.I have a paging for the website I am developing. there are few records in the table which i want to skip from to display in my list in the web page. But paging works on the total num rows as using mysql_num_rows(resultset)
MySQL Num Rows Inside a Loop
Programming
Web Development
14 Years Ago
by BlueCharge
Hi Everyone, I am currently trying to list a leaderboard for refferals. The table is set up with the following columns: id | refferer | user So obviously if someone reffers someone else they will be in a new row so there are multiple rows per person. I am trying to use the following code which echos the user the loop is one but wont echo the …
Re: MySQLi Help
Programming
Web Development
13 Years Ago
by decade
mysqli is much more easier to play than mysql. in your code 1.declare a connection; public $connect; 2.create a construct function. function __construct(){ $this->connect; } I use the $this so that it will call "connect" 3. create the query example INSERT STATEMENT: function newUser($data){ $qry = &…
Re: Mysqli versus PDO
Programming
Web Development
11 Years Ago
by diafol
mysqli and PDO are different and I wouldn't say one is better than the other, however, I do find PDO easier to work with. For instance, I don't have to tell PDO about the datatypes I'm using with bound parameters. And output binding is more flexible too (IMO). I would suggest PDO for its compatibility. Some mysqli functions depend upon the …
Re: rows and coloumns in 3d array
Programming
Software Development
13 Years Ago
by zeroliken
rows and columns are just common interpretations for 2d arrays I think its more correct to think of it as arrays of arrays or elements of the elements and so on
Re: Mysqli error
Programming
Web Development
10 Years Ago
by UK-1991
Runs perfect $query_get = "SELECT * FROM presence"; and with num rows echo 10
Re: mysql to mysqli
Programming
Databases
10 Years Ago
by diafol
… purposes, mysqli functions just duplicate the mysql equivalent: `mysqli_query()` and `
mysqli_num_rows
()` This is not true for all - so you must check…
Re: Multiple rows deleting problem
Programming
Web Development
13 Years Ago
by klemme
No apologizes needed, thats what the forum is for! I guess you can put your hidden field there, I just allways put them just before the submit button, so your form would look like this: First I would check if the form has ben submitted, and run the delete query at the top of the page, but before you do your num rows count: - Note i am using …
Re: Mysql num rows(): Invalid argument
Programming
Web Development
19 Years Ago
by Troy
[b]Troubleshooting 101[/b] When troubleshooting code problems, the secret is baby-steps. When you have an error, it is always a single statement (or line) that is producing the error. Create a new file, and put in only enough code to produce your problem, then work until you solve it--one line at a time. Baby-steps. In keeping with the baby-steps…
Re: Return number of rows in table
Programming
Databases
18 Years Ago
by stymiee
[url=http://us.php.net/manual/en/function.mysql-num-rows.php]mysql_num_rows()[/url]
Re: Return number of rows in table
Programming
Databases
18 Years Ago
by dc dalton
Actually, not to step on Stymiee's feet but there is a a less memory intensive way to do it. SELECT COUNT(*) FROM table_name The result will be the num rows
Re: What is the most efficient way to get the number of rows from a table?
Programming
Web Development
11 Years Ago
by iamthwee
Looks like you may have a point with count() being faster though. http://stackoverflow.com/questions/2485224/sql-php-which-is-faster-mysql-num-rows-or-select-count Just use it as shown in the eg above.
Mysqli Queries
Programming
Web Development
16 Years Ago
by udaydesai
Hello Friends, i return a database connectivity like this. [code=php] function db_conn() { $mysqli = new mysqli("localhost", "root", "", "test"); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } return $mysqli; } [/code…
mysqli login script error
Programming
Web Development
13 Years Ago
by angelclawdust
hello there - been awhile since ive been about but im ready to crack on with my learning :) kk i used to have this installed on my last "free" host and it worked fine now im on a paid host (hosting24) it doesnt seem to want to work correctly.. kk i got my db back up and files backed up i then proceeded to alter db connection details in …
Re: Mysqli Queries
Programming
Web Development
16 Years Ago
by udaydesai
iam using to delete multiple records by putting in array but iam geeting this error. Array ( [del_60] => 60 [del_80] => 80 [del_btn] => Delete [delid] => 71`#`61`#`51`#`41`#`31`#`21`#`11`#`1`#`32`#`42`#`22`#`52`#`62`#`2`#`12`#`72`#`63`#`33`#`53`#`73`#`43`#`23`#`3`#`13`#`44`#`64`#`4`#`54`#`34`#`74`#`24`#`14`#`75`#`15`#`35`#`25`#`55`#`…
Re: Mysqli Queries
Programming
Web Development
16 Years Ago
by udaydesai
[code=php] if(!empty($_POST['del_btn']) && $_POST['del_btn'] == 'Delete') { $delids = explode('`#`',$_POST[delid]); for($x=0;$x<count($delids);$x++) { if(isset($_POST['del_'.$delids[$x]]) && $_POST['del_'.$delids[$x]]!='') { $delquery=mysqli_query($dbObj, "delete from resource_tasks where id="…
Re: Mysqli Queries
Programming
Web Development
16 Years Ago
by pritaeas
[url]http://nl3.php.net/manual/en/mysqli.query.php[/url] You're using the procedural style of mysqli, so the connection needs to be given as a parameter.
MySQLi Singleton Class
Programming
Web Development
13 Years Ago
by joshmac
I have a singleton class that I am revamping and need a little help with. I want to use the following syntax for my queries without having to declare a global object. Below is my current code: /** * The db database object * * @access private * @var object */ private $db; …
Re: mysqli login script error
Programming
Web Development
13 Years Ago
by angelclawdust
yh sure - the follwing is lines 1-72 <?php // Logare class Logare class Logare { // properties protected $conn = false; // store the connection to mysql protected $conn_datas = array(); // will contain the data for connecting to mysql protected $sid; // for the session ID…
mysqli query only returning one result but multiple rows in num_rows
Programming
Web Development
12 Years Ago
by simplypixie
I am not new to OOP I am tidying up a very large site of mine and trying to create a much better structure (more in keeping with the whole point of OOP). I have decided to use mysqli (please don't suggest PDO as I have decided againast it) which is new to me and am a little confused to say the least with a problem I am having with a basic select * …
MySQLi Help
Programming
Web Development
13 Years Ago
by cuonic
Hi, Just started to mess with MySQLi, created a simple login script, Connection to MySQL server establishes correctly, but then displays username is incorrect, because 0 rows were returned. 1) Am I doing it right, is the mysqli layout I'm using correct ? 2) Database structure is uid - username - password Code : [url]http://pastebin.com…
Re: mysqli query only returning one result but multiple rows in num_rows
Programming
Web Development
12 Years Ago
by DarkMonarch
if i remember correctly mysqli return an object of arrays. so you need to run through arrays, then run again in the array. while($row = $query->fetch_assoc()){ foreach($row as $key => $value){ ... do something
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC