Giter VIP home page Giter VIP logo

howdy_qb's Issues

Feedback for “Select Statement”

Hello
I'm facing a error of undefined $db when I'm trying to use the select query. Am I doing something wrong? I have installed the composer using composer require codesvault/howdy_qb statement. Do I have to include any namespace or any other thing?
I'm trying to get values upon the the below code.
$result =
$db::select('posts.ID', 'posts.post_title')
->distinct()
->from('posts posts')
->where('posts.post_status', '=', 'publish')
->orderBy('post_title', 'DESC')
->limit(10)->offset(2)
->get();

Unable to create new table

I was trying to create a table with below code.

DB::create('cache')
	->column('ID')->bigInt()->unsigned()->autoIncrement()->primary()->required()
	->column('key')->string(255)->required()
	->column('data')->string(255)->default('NULL')
	->index(['ID'])
	->execute();

It is throwing an error. See below:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;

Reason: Some words are reserved for SQL so those are not possible to use as a table column name without proper quotation.

Create join APIs

Join APIs need to be compatible with different types of joins

Not sure what is wrong with innerJoin

Hi, I am using this wonderful library for our client's project. However, I am unable to retrieve data from this innerJoin query.

I seem to be having some trouble here 😕. Perhaps I overlooked something. If anyone could offer a solution, I would greatly appreciate it. 🙏

$result = $db::select( 'bv_sku_key_map.sku_child' )
	->from( 'bv_sku_key_map' )
	->innerJoin( 'bv_sku_child','bv_sku_key_map.sku_key','bv_sku_child.main_sku')
	->Where('bv_sku_child.child_sku', '=','G 10078')
	->get();

Here is the original SQL query, and it is working.

SELECT DISTINCT
	wp_bv_sku_key_map.sku_child
	
FROM
	wp_bv_sku_key_map
	INNER JOIN wp_bv_sku_child ON wp_bv_sku_key_map.sku_key = wp_bv_sku_child.main_sku
WHERE
	wp_bv_sku_child.child_sku = 'G 10078';

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.